Using MVC :
Node App Directory
App.js
Controllers
UserController.js
OtherController.js
Models
UserModel.js
OtherModel.js
Since i used mongoose and mongodb for my dba, and the schema is considered ‘model’ in this case is the mongoose schema. Must i connect mongoose to each Controller and Model file each time i want to access them?
You don’t need to connect to mongoose in every controller/model file, you do it just once in
App.js