I'm running a simple web app backed by node.js, and I'm trying to use redis to store some key-value pairs. All I do is run "node index.js" on the command line, and here's the first few lines of my index.js:
var app = require('express').createServer();
var io = require('socket.io').listen(app);
var redis = require('redis');
var redis_client = redis.createClient();
redis_client.set("hello", "world");
console.log(redis_client.get("hello"));
However, all I get for redis_client.get("hello") instead of "world" is false. Why is it not returning "world"?
(And I am running the redis-server)
What's weird too is that the example code posted here runs fine, and produces the expected output. Is there something I'm doing incorrectly for simple set and get?