Simplified the setup of express node
- git clone this repo
- npm i
- Sequelize is setup following this tutorial https://dev.to/nedsoft/getting-started-with-sequelize-and-postgres-emp
- If sequelize is not installed, globally, can use
npx sequelize-cli <command>
- copy the
envrc.example
to.envrc
ans write your appropriate settings - Install DIRENV
- Run below to activate your env setting
- zsh
eval "$(direnv hook zsh)"
direnv allow
- bash
eval "$(direnv hook bash)"
direnv allow
npx nodemon
- fresh migrate
npx sequelize-cli db:migrate:undo:all && npx sequelize-cli db:migrate && npx sequelize-cli db:seed:all
npx sequelize-cli model:generate --name Role --attributes name:string
npx sequelize-cli seed:generate --name role
npm run erd