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

Add .set() to Express Router #2558

Closed
gtomitsuka opened this issue Feb 21, 2015 · 4 comments
Closed

Add .set() to Express Router #2558

gtomitsuka opened this issue Feb 21, 2015 · 4 comments
Assignees
Labels

Comments

@gtomitsuka
Copy link

Hello,

I've been working on a project and pretend using both EJS and Jade for it.
For this purpose, I thought separating stuff in multiple routers would work. However, when I tried to run it, I noticed the express.Router() does not include a router.set('view engine', 'ejs'). I am currently getting the files using fs and it works fine, but I really would like to have the advantages and simpler code that rendering with Express has.

@gtomitsuka gtomitsuka changed the title Add .set() to Express Router Add .set() to Express Router Feb 21, 2015
@dougwilson
Copy link
Contributor

Hi! We won't add .set and friends to routes, because it's one of the defining difference between routers (simply routing requests) and apps (having settings, methods, etc.). If you need different view engines for different parts of your project, consider simply using sub apps.

@gtomitsuka
Copy link
Author

Nah, I'll fork it and then do my own implementation. Thanks anyway!

@dougwilson
Copy link
Contributor

No problem 👍 let me know how the fork goes, though; the router code won't even exist in Express 5, haha.

@dougwilson
Copy link
Contributor

P.S. this issue is a duplicate of #2524

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

No branches or pull requests

2 participants