New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

disposable-redis

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disposable-redis

Automated creation and shutdown of redis server, intended for test scripts.

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

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 server
disposableRedis.server(function(err, server) {
  console.log("server running on port", server.port);
  server.close();
});
// I don't really care about the server, just gimme a node-redis client over it
disposableRedis.client(function(err, result) {
  result.client.set("key", "value");
  result.close();
});
## Download

For Node.js, use npm:

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: <function(callback) - 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 is null if no error occured.
### client (callback) ### client (port, callback)

Will assure a server is running, connect a node-redis client, and callback with a client object:

{
  client: <connected node-redis client object>
  close: <function(callback) - 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 is null if no error occured.

FAQs

Package last updated on 16 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc