0.1.0 • Published 11 years ago
simple_redis v0.1.0
simple_redis
Get your free redis instance from SIMPLE:REDIS in node.js! This is not for production use, mostly for testing. Please go to http://console.simpleredis.com/ to learn more and request your first instance to confirm your email.
Installation
npm install simple_redis
Usage
var simple = require("simple_redis");
// request instance
simple.request("me@example.com", {connect_timeout: 1000}, function(error, client, info) {
if (error) {
throw error;
}
// do what you need
client.set("pi", Math.PI);
client.quit();
// terminate instance when you're done
simple.terminate(info.id);
});
API
- Requiring
var simple = require("simple_redis");
- Requesting instance
simple.request(email, redis_client_options, callback);
simple.request(email, callback);
You will receive error
(error if any), client
(redis client) and info
(object with redis info) in callback.
- Terminating instance
simple.terminate(id, callback);
Callback is optional, id
is from third argument of simple.request
.
Authors
0.1.0
11 years ago