Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I'm not mistaken, instead of splitting into:

  controllers/
    users.js
    teams.js
  models/
    user.js
    team.js
Just have:

  modules/
    users.js
    teams.js
Where model and controllers for each function is defined within a single file.

I've switched to this convention as well - less context switching of files.



I don't understand what you would have in "models". Services?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: