Socket
Socket
Sign inDemoInstall

adon-config

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    adon-config

This module is used for managing system configurations in cascading order.


Version published
Weekly downloads
9
increased by50%
Maintainers
1
Install size
1.39 MB
Created
Weekly downloads
 

Readme

Source

adon-config

This module is used for managing system configurations in cascading order.

assuming you have a javascript config file with the following item

modules.export = {
  test: {
    something: 'eureka!'
  }
}

you can retrieve them easily by

let config = require('adon-config');

config.load(__dirname);
console.log("My test value is " + config.get('test.something'));

Goal of this module

  • Allows developers to manage configuration files in a common structure
  • Support a mix of common config file types (Javascript, JSON, Coffeescript)
  • Allows overriding of configurations data on different module levels
  • Allows special configurations based on server environment (NODE_ENV)

[NOTE: coffee script is not yet supported]

Installation

$ npm install adon-config --save

Setup

  1. In your node module, create a "config" folder where you want all the config files to exist.
  2. create an "env" folder within it that will contain environment specific configurations.
  3. inside the config folder create a file named default (javascript, json or coffeescript)
  4. (optional) in the "env" folder create configration overrides that you want based on the NODE_ENV value
root
  |-config
  |     |-env 
  |     |   |-development.js
  |     |   |-production.js
  |     |-default.js
  |-index.js

Dependencies

adon-config relies on the following node modules

  • [lodash] (https://github.com/lodash/lodash)

Source codes

adon-config is publicly available on Github

License

GPL

Keywords

FAQs

Last updated on 18 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc