nconf-redis
A Redis store for nconf
Last updated 15 years ago by indexzero .
Repository · Original npm · Tarball · package.json
$ npm install nconf-redis 
SYNC missed versions from official npm registry.

nconf-redis

A Redis store for nconf

Installation

Installing npm (node package manager)

  $ curl http://npmjs.org/install.sh | sh

Installing nconf-redis

  $ [sudo] npm install nconf
  $ [sudo] npm install nconf-redis

Motivation

tldr;?: To break the nconf 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().

  var nconf = require('nconf');
  
  //
  // Requiring `nconf-redis` will extend the `nconf`
  // module.
  //
  require('nconf-redis');
  
  nconf.use('redis', { host: 'localhost', port: 6379, ttl: 60 * 60 * 1000, db: 0 });

Author: Charlie Robbins

Current Tags

  • 0.3.1                                ...           latest (15 years ago)

4 Versions

  • 0.3.1                                ...           15 years ago
  • 0.3.0                                ...           15 years ago
  • 0.2.1                                ...           15 years ago
  • 0.2.0                                ...           15 years ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 3
Dependencies (2)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE