- npm init -y
- npm install --save express body-parser
- npm install --save-dev @babel/core @babel/cli @babel/node @babel/plugin-transform-runtime @babel/preset-env @babel/register @babel/runtime babel-loader
- npm install --save-dev eslint eslint-config-airbnb-base eslint-plugin-import
- npm install -g nodemon
- npm install -g sequelize-cli
- touch .sequelizerc
- npm install --save path
- npm install --save sequelize pg pg-hstore
- sequelize init
- docker pull postgres
- docker run --name new-postgresdb -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres
- docker exec -it new-postgresdb psql -U postgres
- show users: \du
- show databases: \l
- create database: CREATE DATABASE books;
- create user with no password: CREATE USER danny;
- sequelize model:generate --name Book --attributes title:string,price:string,description:string
- npm install --save-dev mocha chai chai-http nyc
- mocha for testing, chai for assertion and nyc for coverage
- https://medium.com/@victorsteven/restful-api-with-nodejs-express-postgresql-sequelize-travis-mocha-coveralls-and-code-climate-f28715f7a014
- https://coralogix.com/log-analytics-blog/morgan-npm-logger-the-complete-guide/
- https://medium.com/zero-equals-false/using-cors-in-express-cac7e29b005b
- https://medium.com/@Ayra_Lux/a-guide-to-orm-sequelize-c276c7b6dd18
- https://hub.docker.com/_/postgres?tab=description
- https://www.twilio.com/blog/guide-node-js-logging