Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[doc] Added README.md

  • Loading branch information...
commit b91e42735d506cdb22ce472c38dee7b1d8115155 0 parents
@indexzero authored
Showing with 39 additions and 0 deletions.
  1. +39 −0 README.md
39 README.md
@@ -0,0 +1,39 @@
+# nconf-redis
+
+A Redis store for [nconf][0]
+
+## Installation
+
+### Installing npm (node package manager)
+``` bash
+ $ curl http://npmjs.org/install.sh | sh
+```
+
+### Installing nconf-redis
+``` bash
+ $ [sudo] npm install nconf
+ $ [sudo] npm install nconf-redis
+```
+
+## Motivation
+`tldr;?`: To break the [nconf][0] codebase into small modules that work together.
+
+## Usage
+The store provided by `nconf-redis` will persist all of your configuration settings to a Redis server. All calls to `.get()`, `.set()`, `.clear()`, `.reset()` are asynchronous taking an additional callback parameter.
+
+The Redis engine also has an in-memory cache with a default TTL of one hour. To change this, just pass the `ttl` option to `.use()`.
+
+``` js
+ var nconf = require('nconf');
+
+ //
+ // Requiring `nconf-redis` will extend the `nconf`
+ // module.
+ //
+
+ nconf.use('redis', { host: 'localhost', port: 6379, ttl: 60 * 60 * 1000 });
+```
+
+#### Author: [Charlie Robbins](http://www.nodejitsu.com)
+
+[0]: https://github.com/indexzero/nconf
Please sign in to comment.
Something went wrong with that request. Please try again.