The default mechanism is not specified and no extension has been added (expressJS & jade)

This is my (simplified) app.coffee :

 app.set('views', __dirname + '/app/views') app.set('view enigne', 'jade') app.listen 8000 

However, when I visit my application, the following error message appears in the browser:

 Error: No default engine was specified and no extension was provided 

Change It turns out that I am mistakenly an idiot and a writing "engine". Thanks @lascort for pointing this out!

+7
pug express
source share
1 answer

You have a typo ...

  app.set('views', __dirname + '/app/views') app.set('view **enigne**', 'jade') app.listen 8000 
+9
source share

All Articles