Basic Node and Express - Use the .env File

Tell us what’s happening:
Describe your issue in detail here.
The code on below link is not passing. I have defined env variable MESSAGE_STYLE with value “uppercase” in replit from secret tab.
Your project link(s)

https://replit.com/@shreyashjoshi1/boilerplate-express-1#myApp.js

solution: https://replit.com/@shreyashjoshi1/boilerplate-expressjson

Your browser information:

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

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

Link to the challenge:

Then, in the /json GET route handler you created in the last challenge access process.env.MESSAGE_STYLE

Meaning you have to access process.env["MESSAGE_STYLE"] inside the route handler function. It’s just how the tests work.

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