This is a boilerplate application for building REST APIs in Node.js using ES6 and Fastify. Intended for use with Postgres using Sequelize ORM.
This application uses yarn, so let's install yarn first.
npm install -g yarn
Install dependencies:
yarn
Set environment (vars):
cp .env-sample .env
Start server:
yarn start
Run tests:
# Run tests written in ES6
yarn test
Run migrations
sequelize db:migrate
Run seeds
sequelize db:seed:all
Create new migration file
sequelize model:generate --name User --attributes name:string,email:string
Generate new seed file
sequelize seed:generate --name add-new-user
** Database details can be updated in the .env file