Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate using an app per route #19

Open
joefitter opened this issue Jul 11, 2016 · 0 comments
Open

investigate using an app per route #19

joefitter opened this issue Jul 11, 2016 · 0 comments

Comments

@joefitter
Copy link
Contributor

Currently an application has one express app instance which uses a router for each route. The downside with this approach is app.set('views') is set on the global app so every route shares the same views (and partials if using express-partial-templates).

If we create a new express app instance for each route, and pass in the global express app instance, we should be able to concatenate the global app views with the route views, and call express-partial-templates passing the child app.

This would result in each route having its own res.locals.partials, which are a superset of the base app partials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant