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