I've been experimenting with the MEAN stack and toying with application structure. According to Mean.io and Mean.js the suggested folder structure for the server backend code (written in Express) looks MVC-like to me:
-server
--- config # Configuration Files (see below)
--- controllers # Server side logic goes here
--- models # schema models goes here
--- routes # rest api endpoints routing - here
--- views # swig based html rendering - here
My question is this: Is there any reason not to adopt a module-based folder structure for the backend server code? On the frontend, they recommend a module-based folder structure for the AngularJS code.
In particular, I thought this stackoverflow response was convincing regarding a module-based folder structure for server code.
Overall, MEAN stack looks pretty darn cool and I want to better understand how to best leverage it.