Use the .env File(node and express

Tell us what’s happening:
Describe your issue in detail here.
… i need help i can’t finger out what am doing wrong.
Your project link(s)

solution: https://replit.com/@mateyeben/boilerplate-express-5

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0.

Challenge: Use the .env File

Link to the challenge:

If you visit the route from this challenge - https://boilerplate-express-5.mateyeben.repl.co/json - displayed is “message is not defined”. Try to figure out why that is happening.

hi, if you are confused about the .env file in replit, like you prolly already learned, its a file which can store vital data used by your app, very often with the need to be ‘hidden’ and not revealed for users. On replit projects, you can see the files in the respective project, on the right, but since .env is meant to be hidden, its not listed among the regular files, but in fact has its own tag on the most-right menu. The buttons there are for “Files”, “Packages”, “Settings” and whatnot and among them there is the “Secrets (Environment Variables)” button, which has a lock image. If you click on it, it provides an interface to interact with the .env file and add new variables(secrets) as key/value pairs. The purpose of this is, whenever you share your replit code online, the .env file remains unlisted

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