localsettings

Azure local.settings.json loader for node

Usage no npm install needed!

<script type="module">
  import localsettings from 'https://cdn.skypack.dev/localsettings';
</script>

README

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