Skip to content

Start a single Redis server for testing or ephemeral data.

License

Notifications You must be signed in to change notification settings

vweevers/tmp-redis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmp-redis

Start a single Redis server for testing or ephemeral data.
redis-server must be available in PATH. No cluster support.

npm Node version Travis AppVeyor JavaScript Style Guide

Usage

Start a Redis server on port 6380:

const tmp = require('tmp-redis')

tmp(6380, function (err, shutdown) {
  if (err) throw err

  // When you're done
  shutdown(function (err) {
    if (err) throw err
  })
})

API

tmp(port[, options], callback)

Port must be a number. The callback will receive an error if any, a shutdown function that stops Redis, and a path string to the configuration on disk (in a temporary directory). The optional options object may contain the following properties:

  • verbose: boolean, if true, pipe Redis output to stderr
  • password: string, default none, require clients to connect with this password
  • bufferLimit: boolean, if false, disable client-output-buffer-limit

License

MIT © 2013-present Carlos Rodriguez, Terra Eclipse, Inc. and Contributors. Forked from haredis-tmp.

About

Start a single Redis server for testing or ephemeral data.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%