Basic Node and Express - Use the .env File

Keep on getting error and cant get passed this challenge
Keep on getting error and cant get passed this challenge as below;

// running tests
The response of the endpoint /json should change according to the environment variable MESSAGE_STYLE
// tests completed
// console output
[Error: Not found]

I have tested on browser, its working as expected. but for some reason the fCC test algorithm not able to pass it . Kindly help out.

solution: Backend Challenges of freeCodeCamp curriculum - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Challenge: Basic Node and Express - Use the .env File

Link to the challenge:

You are not using the correct boilerplate for this challenge.

You have the correct one here:
https://replit.com/@rajarubanrajind/boilerplate-express

This won’t run though, because you’ve moved all of the files/folders inside a boilerplate-express folder.

Move everything back to the root folder, your repl will run and this link to your live project will pass this challenge:
https://boilerplate-express.rajarubanrajind.repl.co/

2 Likes

Thanks for the insight, Seems like the test algo seeks files at root level of the app

It’s not the tests which are the issue. It’s that your repl won’t run at all if you hide everything in a sub-folder.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.