Wondering what is the best way to structure the ejs part of the application, here is my current structure.
inside maindir/
- index.js // starts the application
- node-modules
- homepage/ // i would be creating a folder like this for each view
- partials/ // has common components navbar.ejs and footer.ejs.
inside the maindir/homepage/
- routes.js // has the app.get/post/put/deletes({"/homepage", controller.*})'s
- controller.js // exports the controllers
- models.js // exports mongo models
- ejs/
inside the /maindir/homepage/ejs/
- app.ejs // imports common partials e.g. navbar & footer from partials/ & homepage specific components from components/
- components/
is this a decent way to structure an application? specifically the importing from the partials/ directory into each new view or is there a better way to achieve this goal ?