Skip to content

Instantly share code, notes, and snippets.

@gavinmyers
gavinmyers / main.coffee
Created May 14, 2012 01:50
Coffeescript, Nodejs, Redis Hello World
http = require "http"
redis = require "redis"
Single = require("./single")
http.createServer( (req, res) ->
client = redis.createClient()
people = []
client.get "people", (err,cres) ->
people = if cres == null then [] else JSON.parse cres