The first test will not pass for some reason.
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