This is a boilerplate application for building REST APIs in Node.js using ES6 and Express. Intended for use with Postgres using Sequelize ORM.
Install dependencies:
npm i
Set environment (vars):
cp .env.example .env
Start server:
# Start server
npm run dev
Install nodemon and sequelize-cli
npm install -g nodemon
npm install -g sequelize-cli
Create database
sudo su postgres
psql
CREATE DATABASE db_name
Create Migration
sequelize model:create --name Test --attributes title:string,price:string,description:string
Migrate all migrations
sequelize db:migrate
Revert all migrations
sequelize db:migrate:undo