Configuring Environment Variables in Node.js



Hey guys, recently one of you asked a question in the MERN playlist. It was about managing environment variables, like MongoDB credentials, in a Node.js app. In the video, I extract the variables from process.env and assign easy-to-guess defaults as a fallback. The plan was to then provision a local MongoDB Docker container with those defaults, and use it for development. This way, I’d feel comfortable committing those variables to version control, since they were never intended to be used…

8 thoughts on “Configuring Environment Variables in Node.js

  1. Code Realm back at it again. I WAS HERE. In time you will have many followers friend. I appreciate your response to comments and want to say you do tutorials the best in my opinion and I wish we had mass content from you, but am incredibly thankful for what you do put out.
    My?: I've been using MacOS as an environment for some time professionally to code. I've been debating using Ubuntu instead as I'm not a huge fan of Windows. May you consider an OS video in which you briefly explain the different OS environments, what to expect from a software engineer perspective/focus, the pros and cons of each, and what personal machine you use with Ubuntu? Also, it would be great to hear your story in a video at some point if you are comfortable. Did you get a CS degree, teach yourself, attend an immersive Bootcamp program, and what your focus is in your current career? What are tips you would share with new aspiring developers and engineers alike for digging beyond the surface level of learning and into learning and understanding the knowledge you are teaching in your videos and what you utilize in your day to day workplace? Thanks for your time creating and editing these videos for our benefit. Cheers!

Leave a Reply to Quan Truong Cancel reply

Your email address will not be published. Required fields are marked *