Answer the question
In order to leave comments, you need to log in
How to use process via env without modules and json settings?
There is an example on the site.
import { env } from 'process';
env.TEST = 1;
console.log(env.test);
env.text = '123'
console.log(env.text)
text
and it already gave out not 123, but my text Answer the question
In order to leave comments, you need to log in
Create an environment variable on your system and access it via process.env.VAR_NAME
.
If you want to pass parameters when the application starts, then read about process.argv
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question