Boilerplate for Node Express, Sequelize
- Clone this repo
git clone https://github.com/zinirun/node-start-kit
- Setup yarn/npm packages
yarn install # npm install
- Happy hacking
- Start express for development:
yarn dev # npm run dev
- Start express for production:
yarn start # npm run start
- For production start, You need to install PM2 globally
yarn global add pm2 # npm install pm2 --global
- For production start, You need to install PM2 globally
- Start express for development:
- cookie-parser
- cors
- dotenv
- express
- moment
- morgan
- mysql2
- sequelize
/bin/server.js
: start express server/controllers
: define your routers/models
: define your database(MySQL)- You can define your tables in the same directory (reference at models/User.js)
./app.js
: define express server and middlewares./.env
: define your environment variables