Giter VIP home page Giter VIP logo

node-conman's Introduction

Conman

Configuration manager for Hapi.js.

var Hapi = require('hapi');

var server = new Hapi.Server(80);
server.require('conman', { configPath: '/path/to/configs' }, function (err) {
  if (err) {
    throw err;
  }
});

In handler:

var value = server.plugins.conman.get('key.of.config.item', 'default value');

Configs

The configs is a group of YAML files. When initializing Conman all the files in configPath will be loaded and merged into one object. A file named config.yaml will always be loaded last. This allow overriding stuff in production or development.

Objects in your configuration can be traversed using a keypath where keys are separated by .. If value was not found in config defaultValue or null will be returned.

node-conman's People

Contributors

simme avatar

Stargazers

Chris Witko avatar

Watchers

Hugo Wetterberg avatar John O'Neill avatar James Cloos avatar Dan Carlberg avatar christian avatar Justin Medoy avatar Alex Qin avatar  avatar Billy Ohgren avatar Adam Nyberg avatar Eric Doty avatar Emil Vikström avatar Nicholas Vincent DiSanto avatar  avatar Dev0 avatar Daniel Tyner-Bryan avatar Jake Etter avatar Nichole Boseman avatar Skye Freeman avatar Victor Crispin avatar Mike Chan avatar Zayne Halsall avatar Nancy Thornton avatar Len Gillespie avatar  avatar Bloglovin CI avatar Alex Harris avatar Darren avatar Douglas Moore avatar  avatar Kevin Naughton Jr. avatar  avatar  avatar  avatar Suraj Kumar Maurya avatar  avatar  avatar Rashmi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.