@eddiewen/dotenvjson

1.0.1 • Public • Published

dotenvjson

npm version Dependency Status Standard Version CircleCI Coverage Status

This is a module to load .json file, like config.json, and export variables to process.env. Inspired by dotenv.

Installation

$ yarn add @eddiewen/dotenvjson

# npm install --save @eddiewen/dotenvjson

Usage

Create a .env.json file in the root folder of your project.

const dotenvjson = require('@eddiewen/dotenvjson');

dotenvjson();

And you get process.env now.

Options
  • path

Default value: path.join(process.cwd(), '.env.json')

You can use a custom config file path.

  • inUpperCase

Default value: true

You don't have to use upper case in config file. Parser transforms them to upper case if this is true. Or spelling names would be kept.

/@eddiewen/dotenvjson/

    Package Sidebar

    Install

    npm i @eddiewen/dotenvjson

    Weekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.9 kB

    Total Files

    8

    Last publish

    Collaborators

    • eddiewen