syllabus icon indicating copy to clipboard operation
syllabus copied to clipboard

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

Open nbogie opened this issue 5 years ago • 1 comments

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

nbogie avatar Jul 28 '20 09:07 nbogie

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.

kerimhudson avatar Jul 20 '21 15:07 kerimhudson