disposable-redis
Will conjure a redis server for you to use and discard.
Intended to be used by automated tests that depend on a redis server.
When first called, will download and compile redis. Subsequent calls will use the existing redis.
Quick Examples
// gimme a serverdisposableRedis;
// I don't really care about the server, just gimme a node-redis client over itdisposableRedis;
npm install disposable-redis
Documentation ### server (callback) ### server (port, callback)
Will assure a server is running, and callback with a server object:
port: <integer: server port> close: < - shutdown server. callback param is optional>}
Arguments
- port - default=6380. Run the server on this port.
- callback(err, server) - Called after server is operational or an error has occured.
err
isnull
if no error occured.
Will assure a server is running, connect a node-redis
client, and callback with a client object:
client: <connected node-redis client object> close: < - shutdown server. callback param is optional>}
Arguments
- port - default=6380. Run the server on this port.
- callback(err, client) - Called after client object is operational or an error has occured.
err
isnull
if no error occured.