Setting up the .env file and Git Ignore File
Learn to set up the .env and the Git ignore files.
Setting up the .env
file
Previously, we discussed what the .env
(environmental variables) file is all about. To recap, it’s a text file that contains credentials we want to keep secret and secure.
For our use case, three items are kept in the .env
file:
-
MONGO_URL
: Mongo DB Atlas URL secret -
JWT_SECRET_KEY
: JSON web token secret key -
PORT
: Local port
Get hands-on with 1300+ tech skills courses.