Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 765 Bytes

File metadata and controls

25 lines (16 loc) · 765 Bytes

Blog: Sequelize + Express

This is an example of how to setup Sequelize and Express together in a project for NodeJS 10 and above.

Some features of this example

  • It uses migrations
  • It does not use .sync()
  • It initializes the models in the index.js folder

Feel free to download this and use as a starting point for your new project!

This example uses PostgreSQL as a database engine.

See it in action

  • Install PostgreSQL and run $ createdb sequelize-blog
  • Install project dependencies with npm install or yarn install
  • Run the migrations $ sequelize db:migrate
  • Run the express server with npm start
  • Open your browser in localhost:3000 and explore. Review the routes files to see what endpoints are available.

License

MIT