Created
December 30, 2010 01:19
-
-
Save mranney/759320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = require("redis").createClient(), | |
util = require("util"); | |
client.set("some key", "A value with Unicode: ☕"); | |
client.get("some key", function (err, reply) { | |
// a wise user also checks for errors | |
console.log("Reply: " + reply); | |
}); | |
client.hmset("hash key", "prop1", "val1", "prop2", "val2"); | |
client.hgetall("hash key", function (err, res) { | |
console.log("Val: " + util.inspect(res)); | |
client.quit(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rv-mjr2:~/work/node_redis (master)$ node example.js | |
Reply: A value with Unicode: ☕ | |
Segmentation fault | |
rv-mjr2:~/work/node_redis (master)$ npm uninstall hiredis | |
npm info it worked if it ends with ok | |
npm info using [email protected] | |
npm info using [email protected] | |
npm info preuninstall [email protected] | |
npm info uninstall [email protected] | |
npm info predeactivate [email protected] | |
npm info deactivate [email protected] | |
npm info postdeactivate [email protected] | |
npm info postuninstall [email protected] | |
npm info uninstall [email protected] complete | |
npm ok | |
rv-mjr2:~/work/node_redis (master)$ node example.js | |
Reply: A value with Unicode: ☕ | |
Val: { prop1: 'val1', | |
prop2: 'val2', | |
hashtest: 'should be a hash' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment