Guest User

Untitled

a guest
Jul 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. var client = require("redis").createClient(),
  2. util = require("util");
  3.  
  4. client.set("some key", "A value with Unicode: ☕");
  5. client.get("some key", function (err, reply) {
  6. // a wise user also checks for errors
  7. console.log("Reply: " + reply);
  8. });
  9.  
  10. client.hmset("hash key", "prop1", "val1", "prop2", "val2");
  11. client.hgetall("hash key", function (err, res) {
  12. console.log("Val: " + util.inspect(res));
  13. client.quit();
  14. });
Add Comment
Please, Sign In to add comment