I dont know, why my solution is bad, someone can help me?

Tell us what’s happening:
Describe your issue in detail here.

I dont know, why my solution is bad, someone can help me?
Your project link(s)

solution: https://replit.com/@jimmym262/boilerplate-express-2

Your browser information:

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

Challenge: Use the .env File

Link to the challenge:

Hello @jimmym262, I think the issue, as far as I can tell, is that you are not requiring dotenv as a dependency (normally you should add the path of the .env file, but in replite only requiring it is enough). Add this to your dependencies:

require('dotenv').config()

Good luck.

Please stop saying this. The dotenv package is not required on repl.


else if (process.env['MESSAGE_STYLE'] == "lowercase")
  {

This isnt the correct logic. You need to return the other message for any other value of the environment variable that is not “uppercase”.

1 Like

Thank you, I assumed it was, seeing that I never tried without. :sweat_smile:

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