Loading...
Loading...
Compare original and translation side by side
npm install @dotenvx/dotenvxyarn add @dotenvx/dotenvx
pnpm add @dotenvx/dotenvx
bun add @dotenvx/dotenvxnpm install @dotenvx/dotenvxyarn add @dotenvx/dotenvx
pnpm add @dotenvx/dotenvx
bun add @dotenvx/dotenvx.envundefined.envundefined
Encrypt it.
As early as possible in your application, import and configure dotenvx:
```javascript
// index.js
require('@dotenvx/dotenvx').config()
// or import '@dotenvx/dotenvx/config' // for esm
console.log(`Hello ${process.env.HELLO}`)$ node index.js
◇ injected env (2) from .env
Hello Dotenvprocess.env.env
对其进行加密。
在应用尽可能早的位置,导入并配置dotenvx:
```javascript
// index.js
require('@dotenvx/dotenvx').config()
// or import '@dotenvx/dotenvx/config' // for esm
console.log(`Hello ${process.env.HELLO}`)$ node index.js
◇ injected env (2) from .env
Hello Dotenvprocess.env.env.env.keys.env.env.keys.env.env.env.env.envrequire('@dotenvx/dotenvx').config()
// or: import '@dotenvx/dotenvx/config'require('@dotenvx/dotenvx').config()
// or: import '@dotenvx/dotenvx/config'