Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hiswe/sequelize-example
a small sequelize example with sub-queries
https://github.com/hiswe/sequelize-example
Last synced: 30 days ago
JSON representation
a small sequelize example with sub-queries
- Host: GitHub
- URL: https://github.com/hiswe/sequelize-example
- Owner: Hiswe
- License: mit
- Created: 2018-05-24T10:33:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T11:04:21.000Z (about 2 years ago)
- Last Synced: 2024-04-13T12:13:56.412Z (9 months ago)
- Language: JavaScript
- Size: 318 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sequelize-example
a small sequelize example with sub-queries
- [prerequisite](#prerequisite)
- [run the demo](#run-the-demo)## prerequisite
- [node js](https://nodejs.org/en/) >= 8.11.2
- [PostgreSQL](https://www.postgresql.org/) >=9.6
- create a clean __sequelize-example__ database
- [postgresapp](http://postgresapp.com/) on a mac
- [postico](https://eggerapps.at/postico/) to visualize## run the demo
```
yarn install && yarn start
```All routes will render the same result but handled in a different way :)
- http://localhost:3000/baskets
- http://localhost:3000/baskets/squel
- http://localhost:3000/baskets/generated-squel## tweaking the configuration
This app use [rc](https://www.npmjs.com/package/rc) for handling configuration
Just duplicate `.sequelizeexample-example` to `.sequelizeexample` and change the values:
- `database`: the full url of your database
*default*: `postgres://localhost:5432/sequelize-example`
- `logQuery`: if you want to print the SQL queries
*default*: `false`