0

Haev any different when use env variable in window and linux. In window i call normally with process.env.variable_name and can get the value in env file. but when in ubuntu, it can't

# .env

MY_ENV_VAR=my_value

// app.js

const dotenv = require("dotenv");

// Add dotenv.config() to the top of the script dotenv.config();

// Use the environment variable const myEnvVar = process.env.MY_ENV_VAR;

console.log(myEnvVar); // my_value

what i need to do in ubuntu to run normally like in window

DT Hieu
  • 1
  • 1

0 Answers0