MrRobotL / node-postgres-sequelize

Home Page:http://mherman.org/blog/2015/10/22/node-postgres-sequelize/#.VijvshNViko

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node, Postgres, and Sequelize

Want to learn how to build this project?

Check out the blog post.

Want to use this project?

  1. Fork/Clone
  2. Install dependencies - npm install
  3. Create a local Postgres databases - todos - and then update server/config.json
  4. Add a "migrations" folder to the "server" folder
  5. Create two new migrations:
$ node_modules/.bin/sequelize model:create --name Todo --attributes "title:string, complete:boolean,UserId:integer"
$ node_modules/.bin/sequelize model:create --name User --attributes "email:string"
  1. Update the migration files in "server/models" (if necessary) and then sync the database:
$ node_modules/.bin/sequelize db:migrate
  1. Run the development server - gulp

About

http://mherman.org/blog/2015/10/22/node-postgres-sequelize/#.VijvshNViko


Languages

Language:JavaScript 86.4%Language:HTML 12.2%Language:CSS 1.4%