Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

Add section on .env files (either MongoDB or in Node module) #35

Open
nbogie opened this issue Jul 28, 2020 · 1 comment
Open

Add section on .env files (either MongoDB or in Node module) #35

nbogie opened this issue Jul 28, 2020 · 1 comment
Labels
good first issue Good for newcomers Node

Comments

@nbogie
Copy link

nbogie commented Jul 28, 2020

Keep the assigned HW (youtube video), but also do 15 minutes in-class, after that to ensure everyone has it.

Ideally this would be added in Node module but we currently have nothing in the node module exercises that needs protecting. Add it when it is NEEDED.

The HW was:

Watch the Daniel Shiffman video https://www.youtube.com/watch?v=17UVejOw3zA
"3.4 Hiding API Keys with Environment Variables (dotenv) and Pushing Code to GitHub"

Although it talks about API keys, it is also the approach we would recommend you take for your mongodb connection URI.

Pay careful attention to the bit about the .gitignore file, too!

Also link to docs on:
repl.it: https://docs.repl.it/repls/secret-keys
glitch: TODO

@kerimhudson
Copy link

Definitely agree this should be added in. I do find a lot of students when building out portfolios will commit things like .env files and whatnot, so nipping that in the bud sounds like a good shout.

Feel we can probably find a way to integrate this into the setting up express and maybe using process.env.PORT for listening.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers Node
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

3 participants