Skip to content
/ nodenv Public

Operating on the NODE_ENV environmental variable

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.996ICU
Notifications You must be signed in to change notification settings

Arylo/nodenv

Repository files navigation

NODE-ENV Manager

Operating on the NODE_ENV environmental variable

node Travis Coveralls Known Vulnerabilities David Author MIT-License 996ICU-License

Usage

Install

npm install node-env-manager

CONST

const { ENV } = require("node-env-manager");

ENV.PROD          // -> "prod",
ENV.PRODUCT       // -> "product",
ENV.PRODUCTION    // -> "production",
ENV.DEV           // -> "dev",
ENV.DEVELOP       // -> "develop",
ENV.DEVELOPMENT   // -> "development",
ENV.LOCAL         // -> "local",
ENV.TEST          // -> "test",
ENV.EXP           // -> "exp",
ENV.EXPERIENCE    // -> "experience",
ENV.GRAY          // -> "gray",
ENV.CI            // -> "ci"
ENV.REAL          // -> "real"

Mothods

const env = require("node-env-manager");

env.init(); // set `process.env.NODE_ENV` value if the value is null
env.get();  // get `process.env.NODE_ENV` value
env.set("prod");  // set `process.env.NODE_ENV` value
env.set(env.ENV.DEV);

env.isLocal();
env.isTest();
env.isDev();
env.isProd();
env.isExp();
env.isGray();
env.isCI();
env.isReal();

About

Operating on the NODE_ENV environmental variable

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.996ICU

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published