tmp-redis
v1.0.0
Published
Start a single Redis server for testing or ephemeral data
Readme
tmp-redis
Start a single Redis server for testing or ephemeral data.
redis-servermust be available inPATH. No cluster support.
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, iftrue, pipe Redis output to stderrpassword: string, default none, require clients to connect with this passwordbufferLimit: boolean, iffalse, disableclient-output-buffer-limit
License
MIT © 2013-present Carlos Rodriguez, Terra Eclipse, Inc. and Contributors. Forked from haredis-tmp.
