-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
jade templating with express.vhost #1277
Comments
so the res.render()s are in the ./main/ etc? and app.set()s in ./app.js? not sure I get it |
@visionmedia yes, res.renders are in ./main and /security and app.sets() and the jade templates itself are in /app.js and /views. this doesn't work. But if I put everying (options, renders, views) in one dir (/main for example) it works |
hmm yeah the subapps should be inheriting those settings |
So we actually have a bug? |
possibly yeah, I'll see if I can reproduce this in a bit |
things have been refactored quite a bit, closing unless it's still an issue |
Yeap, this is still an issue with 3.0.5 |
Ok I've pinpointed the problem but don't have enough knowledge of the internals of express to fix it. application.js line 483 defaultEngine: this.get('view engine'), Returns undefined in what @bodokaiser has presented earlier. this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express); To try and require undefined since ext is ".undefined". An easy hack is to use app.set('view engine', 'jade'); Inside each vhost. |
The problem is actually just a bigger typo, I think.
Can somebody try to rename Regards, |
After some digging around I think that it has something to do with how we use vhosts and how settings are being set. From what I understand settings are local to the app instance that we have at the moment. Is that correct? |
By the way can someone re-open this ticket? It doesn't seem right to open a new one for the same reason. |
Hi,
I got following directory structure:
Because my content is completely client rendered I would like to share the views across the subdomains.
But I now noticed that when I define the view options in the main application file (/app.js):
instead of in the subapplication files (/main/app.js, /security/app.js)
I get follwoing error by calling "res.render('index');
Could this be a bug?
The text was updated successfully, but these errors were encountered: