How do I use environment variables in a Node.js project with dotenv?
I'm building an API with Express and need to store my database credentials without pushing them to GitHub. I've seen a lot of people use dotenv but I'm not clear on how to set it up properly so it works in both development and production.