[ACCEPTED]-Separating models, logic and DAOs in express/node.js-express
Accepted answer
See this project as separate files as follows:
https://github.com/lethus/popbroker
routes.js 7 - Here we put the routes, usually referenced 6 to controllers
models.js - Model here you 5 put the functions of MongoDB
forms.js - You 4 work the validation of objects
controllers 3 / users.js - That would be something like 2 java UI, here we call the models.js and 1 do the insert, update, list, Finds
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.