0.4.0 • Published 12 years ago

konf v0.4.0

Weekly downloads
1
License
-
Repository
github
Last release
12 years ago

Konf

A runtime configuration loader for node apps.

npm install konf

It's purpose is to allow moving seamlessly from configuration files to process.env variables. When deploying to SaaS platforms like Heroku/Nodejitsu/etc non-versioned file uploads are not a possibility. Konf allows you to fallback to environment variables without any changes to your code.

It's also self-documenting, so users installing your application have clear instructions to follow:

screenshot

Usage

var Konf = require('konf')

var config = new Konf().describe({
    appDomain: "The application domain/host name"
  , authCallback: "OAuth callback"
  , twitter: {
        key: "Twitter API key"
        secret: "Twitter API secret"
  }
}).load('./config').env()

This will attemp to populate the given config values first from ./config.(js|json|coffee) file and then from properties on process.env. Environment keys are automatically converted from camelCase to snake_case, and are case-insensitive.

License

MIT

0.4.0

12 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago