Beacon24 / v0

4 stars 2 forks source link

remove .env from repo #12

Closed poppypiney closed 2 years ago

poppypiney commented 2 years ago

currently, the .env file has secret keys to access your cloud services. I think it might be better to keep these secrets secret by not pushing it to the repo. (even, this helps me to quickly start the project)

and also talking about this, could it be possible to keep the MongoDB connection string in .env as well? (this can be helpful in case we want to change it instead of going through and editing the source code)

we also may create a file .env.example like this (and push it to the repo)

MAPBOX_TOKEN=xxxxxxx
CLOUDINARY_CLOUD_NAME=xxxxxxx
CLOUDINARY_KEY=xxxxxxx
CLOUDINARY_SECRET=xxxxxxx
GITHUB_PAT=xxxxxxx
MONGODB_URI=xxxxxxx

which can help us to remember which variables are needed

Beacon24 commented 2 years ago

Good idea, I have waited to do this because I'm uncertain, how do others get the appropriate keys to run the app? Do they have to have all the proper accounts (cloudinary, mapbox, etc)?

I like the idea of putting the MongoDB connection string in there as well. I will have to review how to do so. This is timely, because a friend of mine just advised that I begin work on deploying the app now before it gets any bigger, and I think I'm going to take his advice.

Beacon24 commented 2 years ago

I have deleted the .env file.