@hikyu/env
v1.0.10
Published
To install @hikyu/env, run the following command: ```bash npm install @hikyu/env ```
Readme
To install @hikyu/env, run the following command:
npm install @hikyu/envTo use the package, require it in your project like so:
require('@hikyu/env')(); // Path default to ./.env
require('@hikyu/env')('./.myEnv'); // File path is optionalUsage
Creating file
text=My Variable Text
anyNumber=1Getting variables
Using global.env
console.log(global.env.text)
// Output: My Variable Text
console.log(env.anyNumber) // global is not needed (use only if no other env variable exists)
// Output: 1Using proces.env
console.log(process.env.text)
// Output: My Variable TextLicense
This package is licensed under the MIT License.
