Wednesday 20 January 2016

New to NodeJS. Need a bit of help with SequelizeJS.

So, I'm building a simple API with ExpressJS and a MySQL database, and using Sequelize as an ORM.My question is how do you define the models (eg. User model) in a separate file and folder ? Like having a folder with all the models only. Since to define a sequelize model you have to first create a new instance and stuff like: var sequelize = new Sequelize('database', 'username', 'password', {});

Submitted January 20, 2016 at 06:27PM by shortfuse07

No comments:

Post a Comment