NOTE:
I'm assuming that you already have PostgreSQL in your computer system. If not, you can visit:
https://www.postgresqltutorial.com/postgresql-getting-started/
to know step-by-step how to install PostgreSQL based on your computer operating system.
OK, lets get started:
-
clone this repository to your local system
-
move to cloned repo directory, and then open terminal
-
in terminal, run
npm install
-
install
sequelize-cli
globally by runningnpm install --global sequelize-cli
in terminal -
in
config/config.json
, change username and password based on your own postgres username and password -
in terminal, run
npx sequelize db:create
orsequelize db:create
-
in terminal, run
npx sequelize db:migrate
orsequelize db:migrate
-
in terminal, run
npx sequelize db:seed:all
orsequelize db:seed:all
-
in terminal, run
node app.js
Now your app.js will listen on http://localhost:3000