Curriculum (Backend and APIs) Use the .env File

Tell us what’s happening:
During solving the exercise of Use the .env File on replit it is require to add .env file where it is not allow by the website by itself instead of it they offering Secrets (System environment) option when i use it the FCC engine keep consider the fail of challenge.

  • use dotenv configure
  • run in both local and replit

it gave correct results but the challenge fail in evaluating

Your project link(s)

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

Your browser information:

Challenge: Use the .env File

Link to the challenge:

Did you perhaps overlook this part of the instructions:

Note: If you are using Replit, you cannot create a .env file. Instead, use the built-in SECRETS tab to add the variable.

I’m not sure what ‘it gave correct results but the challenge fail in evaluating’ means. Either it works or it doesn’t?


Ah, I see. Your code is checking the value of the Secret out in the global space instead of inside your Get. This means that when the tests change the value of the Secret, it is not possible for your code to react to this change.

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