better-process-env
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Better-process-env

What

Configuration utility for server apps

Why

  • Read process.env variables
  • Parse strings, JSON, numbers
  • Check against example that all variables are defined, and no extra variable are defined (configurable)
  • Immediately throw if user tries to access undefined variable config.get("INVALID_VARIABLE")
  • Expose .get() and .getObject() methods
  • Only allow to access process.env variable if it is also defined in .env.example file

Example

import config from "better-process-env";
console.log(config.get("PORT"));

Package Sidebar

Install

npm i better-process-env

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

9.95 kB

Total Files

7

Last publish

Collaborators

  • yant