- Boilerplate application for building Node/Express, and Sequelize RESTful APIs with TypeScript
- Node 14.0
npm install or npm i
npm run server
Or
tsc | node ./dist/server.js
- For development, define required variables in dist/config/development.json
- For production, define required variables as environment variable in remote setup.
- If using mySQL for the project, use the following command to
install brew install mysql2
- Every Database Table should have a corresponding Model file in
modelsfolder - We use
Sequelizeas our ORM - Use
npx sequelizeto cli for migrations - The
controllersandroutesfolder should exactly mimic each other. All routers inroutesshould have their correspondingcontrollersfile/folder - All logging should be done using
req.log. It's a bunyan logger. For model level logging,req.logshould be passed to underlying layers