So we're building an express app, which provides a nice API and is flexible enough to let us build on top of whatever structure we want. So, how our structure is gonna be?
I was checking the Buse project, which @luizrogeriocn made a nice work modularizing the app in the following way:
|- app
| |- models
| | |- geo_position.js
| | |- person.js
| | |- ...
| |- routes.js
|- config
| |- config.js
| |- database.js
|- test
| |- ...
|- index.js
|- server.js
For this project, I think this structure is more than enough. It gives us some file modularization and yet it's simple. For a larger project, we can elaborate to make it more sophisticated.
I've also been checking this template. It separetes the models with its specific routes. Worth to check it out.
So, what do you say?
So we're building an express app, which provides a nice API and is flexible enough to let us build on top of whatever structure we want. So, how our structure is gonna be?
I was checking the Buse project, which @luizrogeriocn made a nice work modularizing the app in the following way:
For this project, I think this structure is more than enough. It gives us some file modularization and yet it's simple. For a larger project, we can elaborate to make it more sophisticated.
I've also been checking this template. It separetes the models with its specific routes. Worth to check it out.
So, what do you say?