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

Can i use multiple videv engines with this framework? #192

Closed
jiriToman opened this issue Jul 28, 2020 · 1 comment
Closed

Can i use multiple videv engines with this framework? #192

jiriToman opened this issue Jul 28, 2020 · 1 comment

Comments

@jiriToman
Copy link

I am using express 4.x and hbs as a view engine. However I am unable to load html file(.hbs files load correctly).

I have allowed 2 view engines

app.set("view engine", "html");
app.set("view engine", "hbs");

however when I render html file

app.get("/purchase", (req, res) => {
  res.render("index.html");
});

I get Error: Cannot find module 'html'.

Is possible using multiple view engines in express 4.x? If yes what am I doing wrong? Thx for any help.

@dougwilson
Copy link
Contributor

Hi @jiriToman sorry I cannot transfer this issue to the express repo. Your question is about using multiple view engines with express; this is just one of the view engines. Can you ask on the express repo?

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

No branches or pull requests

2 participants