Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fourthmace/boilerplate-express-sequelize-js
simple boilerplate for node express + sequelize
https://github.com/fourthmace/boilerplate-express-sequelize-js
express node-js sequelize-orm
Last synced: 21 days ago
JSON representation
simple boilerplate for node express + sequelize
- Host: GitHub
- URL: https://github.com/fourthmace/boilerplate-express-sequelize-js
- Owner: fourthmace
- Created: 2024-09-12T00:11:11.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T00:16:41.000Z (2 months ago)
- Last Synced: 2024-10-15T02:24:21.597Z (about 1 month ago)
- Topics: express, node-js, sequelize-orm
- Language: JavaScript
- Homepage:
- Size: 43 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# SETUP
1. install all libs
```
npm install
```2. copy env_example to .env
```
cp .env.example .env
```3. make sure your database is READY!
4. run migration & seeder
5. run app
```
npm run start
```# MIGRATION TABLE
1. create new migration file
```
npx sequelize-cli migration:generate --name create-user-table
```2. run migration
```
npx sequelize-cli db:migrate --env development
```3. rollback migration
```
npx sequelize-cli db:migrate:undo:all --env development
```# SEEDER TABLE
1. create new seeder file
```
npx sequelize-cli seed:generate --name user-seeder
```2. run seeder
```
npx sequelize-cli db:seed:all// OR
npx sequelize-cli db:seed --seed 20240817102423-user-seeder.js
```