Saturday, 16 March 2019

How do you render when organising project by feature?

Hello all,​I have changed the structure of my project and now I group stuff by features. Instead of putting all routes in "Routes", all controllers in "controllers", etc. I find the new way much better but I have found that for rendering the local file as it is not anymore in the "views" folder I have to do:res.render("../auth/login"); presumably we are in views so we go up and then auth/login.ejsAnd inside login.ejs I have to do:<%include ../views/partials/header %>​Is this the way to follow when using project structure by feature?​Thank you in advance!​​

Submitted March 16, 2019 at 07:39AM by dejavits

No comments:

Post a Comment