Adding .env file to DigitalOcean Ubuntu droplet
I am deploying an MERN application to DigitalOcean for the first time. I’ve previously always deployed my apps via Heroku. I’m trying to figure out the best way to handle the variables in the .env file. Is it okay to directly upload a .env file to the DO server? Will those variables remain private? If so, can anyone point me in the right direction for creating a .env file with the variable information in it from an Ubuntu command line?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×