Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * host= 192.168.56.3
- * port= 5555
- * password= secret
- */
- var redis = require("redis"),
- client = redis.createClient({host:"192.168.56.3", "port":5555, "password":"secret"});
- client.on("error", function (err) {
- console.log("Error " + err);
- });
- client.on("ready", function (err) {
- // save a string
- client.set("a","10");
- // read a string
- client.get("a", function(err, data)
- {
- console.log(data)
- })
- client.quit()
- });
Add Comment
Please, Sign In to add comment