Advanced Node and Express - Use a Template Engine's Powers - Not passing

I am not getting “Advanced Node and Express - Use a Template Engine’s Powers” to pass. I’ve reviewed the posting having to do with the " Advanced Node and Express" challenges, as it appears there have been problems with things missing in this challenge. I didn’t find a posting that looked specific to this particular challenge.

As a result, I’ve added

const cors = require('cors');

to my server.js file

I looked at the test source on github


The one test for this challenge appears to only be looking for “Please login” as the pug-variable.

assert.match(data, /pug-variable("|’)>Please login/gi

It appears that I am getting this variable assigned and it is rendering for me, but the test is not passing. Any suggestions?

Here is my glitch project:

Thank you!

I have been advised that the production code now uses this markdown file instead of the json file I referenced above.


But this file has the same assert that I noted above.

I tested your url on the beta site and it passes the test.

The beta site contains many changes and fixes of the current production site. We should be rolling these changes to the production site soon.

The data which gets passed back from the call to your function is correct (see below for a formatted version of what gets passed back to the test):

    <title>FCC Advanced Node and Express</title>
    <meta name="description" content="A cool thing made with HyperDev"/>
    <link id="favicon" rel="icon" href="" type="image/x-icon"/>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" href="/public/style.css"/>
    <h1 class="border center">FCC Advanced Node and Express</h1>
    <h2 class="center" id="pug-success-message"></h2>
    Looks like this page is being rendered from Pug into HTML!Hello
    <p id="pug-variable">Please login</p>
    <script src="" integrity="sha256-gvQgAFzTH6trSrAWoH1iPo9Xc96QxSZ3feW6kem+O00=" crossorigin="anonymous"></script><script src="/public/client.js"></script>

which is why the assert regex of /pug-variable("|’)>Please login/gi matches what it returns.

We apologize the production version is not accepting your solution, but are working on getting the beta version moved to production as soon as possible.

1 Like

i also tested your code now - sharing your glitch app link and it passed…

Thank you!!

I’ll move on to the next exercises for now and resubmit this challenge later, after the beta is implemented. Is there any way I can tell when that is?