Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7165

How can I create a .env file in Ubuntu?

$
0
0

I have an app deployed on an AWS EC2 Ubuntu instance. I use dotenv for development, but manually input my environment variables in production to avoid exposing them on GitHub.

My goal is to create a .env file outside my app directory so that I don't have to manually input my environment variables each time I deploy new code.

I've configured dotenv as follows:

require("dotenv").config({ path: "../../environment-variables/Ticketing-App/.env" });

Running "sudo touch .env" inside the Ticketing-App directory neither creates the file nor generates an error.

Is it possible to create a .env file on Ubuntu? If so, how?


Viewing all articles
Browse latest Browse all 7165

Trending Articles