Closed davidyapdy closed 7 years ago
Hi David!
I am sorry that I didn't notice your post earlier.
In the signupController.js
you can see that I use the Model
to create a new user:
Model.User.create(newUser).then(...
.
Basically, it gives us access to all models we defined for Sequelize in the models.js
file. User
is one of the defined models and we can define more models and relationships between them. Have a look here how to do that: http://docs.sequelizejs.com/en/latest/docs/models-definition/.
Hope this helps!
In the file "./app/controllers/signupController.js", you included Model to be required from "../model/models.js"
Why is model.js is required? Are we referring to this?
I'm learning how to use this and I hope you don't mind me asking.