use environment variables in package.json

53 views Asked by At

How to use environment variables in .json file.

For example, I have a PROXY variable in .env

PROXY=http://localhost:5000

So how can I use this PROXY variable in package.json

{
  "name": "name",
  "version": "1.0.0",
  "proxy": process.env.PROXY,
  "private": true,
  ...
}
0

There are 0 answers