Advanced Node and Express - Set up a Template Engine unable to pass

The first test will not pass for some reason.

Code: https://peat-panda.glitch.me

Lesson: https://learn.freecodecamp.org/information-security-and-quality-assurance/advanced-node-and-express/set-up-a-template-engine

I can’t access the code you linked.

Error: ENOENT: no such file or directory, stat '/appviews/pug/index'

Seems to be something wrong with the routing. Could you paste the snippet here instead?
app.set(‘view engine’, ‘pug’);
It will set the default route to /views/ unless you state it yourself.
The link you provided is trying to access appviews/pug/index.pug when it should access views/pug/index.pug

2 Likes

Try fix your link wihtin of the middleware.

res.render(process.cwd() + '/views/pug/index.pug');
3 Likes