Search code examples
node.jsmongodbexpressmongodb-atlasdotenv

How to run a project without dotenv?


I've created a Node.js/Express.js that manipulates a Mongo database through a connection to MongoDB Atlas. The thing is that the login to MongoDB Atlas info is stored in a .env file, which must not be uploaded to GitHub. So how will anyone trying to run my project do it without the data inside .env` ? I downloaded the project and tried to run it, but the app complains about the lack of the login to MongoDB Atlas info. The project is for a test to get a job in a company, so they will probably need to manipulate the database to evaluate my code. Should I give them the login info ?


Solution

  • Make an .env.sample

    Add ENV Vars there but leave them empty, so they can add their own