localsettings

local.settings.json loader for Azure Functions

Downloads
87
Stars
3

local.settings

A zero-dependency process.env loader for Microsoft Azure's local.settings.json file

Install

# with npm
npm install localsettings

# or with Yarn
yarn add localsettings

Usage

As early as possible in your application, require and configure localsettings

require('localsettings').config()

process.env now has the keys and values you defined in your local.settings.json file.

Preload

You can use the --require (-r) command line option to preload localsettings. By doing this, you do not need to require and load localsettings in your application code. This is the preferred approach when using import instead of require.

$ node -r localsettings/config your_script.js
Package Rankings
Top 38.75% on Npmjs.org
Related Projects