Neverending Plethora of Modules
    Have ideas to improve npm?Join in the discussion! »

    envitro

    1.0.3 • Public • Published

    envitro

    Build status Git tag NPM version Code style

    Load environment from package.json.

    I'm pretty sure this is the best name ever.

    Installation

    $ npm install envitro
    

    Usage

    package.json

    {
        "environment": {
          "production": {
            "API": "api.weo.io"
          },
          "development": {
            "API": "localhost:3000"
          }
        }
    }

    NODE_ENV="development"

    require('envitro')()
     
    process.env.API // => 'localhost:3000'

    API

    envitro(dir)

    • dir - director to locate package.json (default: process.cwd)

    License

    MIT

    Keywords

    none

    Install

    npm i envitro

    DownloadsWeekly Downloads

    8

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • avatar