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');
app.use(cors());

to my server.js file

I looked at the test source on github

freeCodeCamp/curriculum/blob/dev/challenges/06-information-security-and-quality-assurance/advanced-express-tools.json

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: https://glitch.com/~courageous-hole

Thank you!

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

[https://github.com/freeCodeCamp/freeCodeCamp/blob/master/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/use-a-template-engines-powers.english.md]

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

I tested your url on the beta site freecodecamp.rocks 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):

<html>
  <head>
    <title>FCC Advanced Node and Express</title>
    <meta name="description" content="A cool thing made with HyperDev"/>
    <link id="favicon" rel="icon" href="https://hyperdev.com/favicon-app.ico" 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"/>
  </head>
  <body>
    <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="https://code.jquery.com/jquery-2.2.1.min.js" integrity="sha256-gvQgAFzTH6trSrAWoH1iPo9Xc96QxSZ3feW6kem+O00=" crossorigin="anonymous"></script><script src="/public/client.js"></script>
  </body>
</html>

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?