fancy-env
a tool for loading enveroment and support import multiple env files
usage
add env/global.env
env/dev.env
env/dev.lovale.env
ect. and write your environment variables in those files.
in every environment
if there is LOCAL_API
variables in your process.env
,[env].locale.env
will be load.
the [env]
in [env].locale.env
and [env].env
means your process.env.ENV
priority of files is [env].locale.env
-> [env].env
-> global.env
import fancyenv from "@suary/fancy-env"
const obj={
//the params you want to add in process.env but not in .env files
}
fancyenv(obj) //obj is a optional argument