0.2.3 • Published 5 years ago

node-properties v0.2.3

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

node-properties

NPM

Extremely flexible, no-hassle configuration for nodejs applications.

Install

npm i node-properties

Usage

defaults.yaml

user:
  name: John

index.js

import {config} from 'node-properties';

const name = config.get('user.name');
console.log(`Hello ${name}!`);

// Output: Hello John!

Sources

By default, properties are retrieved in the following order:

  1. Command line parameters
  2. Environment variables
  3. config/${NODE_ENV} (.yaml, .json, or .env)
  4. config/defaults (.yaml, .json, or .env)
0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago