monkeywrench

Node.js helper library

npm install monkeywrench
2 downloads in the last week
4 downloads in the last month

node-monkeywrench

Node.js helper library

Configuration

Introduction

Configuration can come from a variety of sources:

  • text files
  • command line options
    • single character options (-d)
    • multiple character options (--dir)
  • environment variables ($HOME)
  • Windows registry

monkeywrench was designed to extract configuration from nodejs applications.

Configuration

Configuration is configured with a JSON file of the following format:

{
    "targets": {
        "propertyname": {
            "description": "This is a one-liner about what this property does",
            "long_description": "This is a much longer description of the property.",
            "default": false,
            "required": false,
            "type": "boolean",
            "where": [
        }
    }
    "sources": [
        {"type": "file", "filename": "~/.myconfig"},
        {"type": "env"}
    ],
}
npm loves you