From b08954ae90e29bc7377dad73cd84536d634bea75 Mon Sep 17 00:00:00 2001 From: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Date: Mon, 1 Aug 2022 00:37:49 -0600 Subject: [PATCH] fix: Change instructions for Set up a Template Engine challenge to make user implement res.render() (#47108) fix: have user implement res.render --- .../advanced-node-and-express/set-up-a-template-engine.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 50ad2af8d79..08d21a01237 100644 --- a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -22,11 +22,11 @@ A template engine enables you to use static template files (such as those writte Express needs to know which template engine you are using. We will use the `set` method to assign `pug` as the `view engine` property's value: `app.set('view engine', 'pug')` -Your page will not load until you correctly render the index file in the `views/pug` directory. +Your page will be blank until you correctly render the index file in the `views/pug` directory. -Change the argument of the `res.render()` declaration in the `/` route to be the file path to the `views/pug` directory. The path can be a relative path (relative to views), or an absolute path, and does not require a file extension. +To render the `pug` template, you need to use `res.render()` in the `/` route. Pass the file path to the `views/pug` directory as the argument to the method. The path can be a relative path (relative to views), or an absolute path, and does not require a file extension. -If all went as planned, your app home page will stop showing the message "`Pug template is not defined.`" and will now display a message indicating you've successfully rendered the Pug template! +If all went as planned, your app home page will no longer be blank and will display a message indicating you've successfully rendered the Pug template! Submit your page when you think you've got it right. If you're running into errors, you can check out the project completed up to this point.