Skip to content

Building REST API in Node/Express Application using Sequelize,Postgres

Notifications You must be signed in to change notification settings

zapragartiast/node-sequelize-tutorial

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building REST API in Node/Express App using Sequelize,Postgres

This Repository is building REST API Design in Node/Express App using Sequelize and Postgres.

PreRequisites

Setup

 $ npm install
 $ node_modules/.bin/sequelize init

Sequelize init will creat a folder config,controller,migrations and models

create a file called .sequelizerc

const path = require('path');

module.exports = {
  "config": path.resolve('./server/config', 'config.json'),
  "models-path": path.resolve('./server/models'),
  "seeders-path": path.resolve('./server/seeders'),
  "migrations-path": path.resolve('./server/migrations')
};

Create a Database testdb in Postgres Dashboard

$ node_modules/.bin/sequelize db:migrate      

To Run Application

$ node index.js

About

Building REST API in Node/Express Application using Sequelize,Postgres

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%