@webgap/configuration

0.1.4 • Public • Published

WebGAP Configuration

Build Status Test Coverage Code Climate Dependency Status

NPM version NPM downloads

README

This is the base configurations module for WebGAP. Contains base configurations Schema for all WebGAP components.

Dependencies

Handles configurations using node-convict.

Requirements

This module uses 2 environment variables. Only environment variables, no options parameters, are used in order to make sure the configurations and configurations schema is loaded once and only once (Caching Caveats).

The module loads a configuration JSON file:

NODE_APP_CONF - Full path to the configuration file 

The module holds a default schema for configurations used by WebGAP. If you want to use your own, it can be overridden using the following environment variable:

NODE_APP_CONF_SCHEMA - Full path of an alternative configurations schema

API

Installation

npm install @webgap/configuration --save

Usage

var configuration = require('@webgap/configuration');
...
var tokenSecret = configuration.get('GENERAL.TOKEN.SECRET');
...

Schema

Check the file configurations-schema.json for schema definition.

License

Apache License, Version 2.0

Package Sidebar

Install

npm i @webgap/configuration

Weekly Downloads

1

Version

0.1.4

License

Apache-2.0

Last publish

Collaborators

  • webgap