Skip to content

Instantly share code, notes, and snippets.

@wraithan
Created April 13, 2011 18:07
Show Gist options
  • Save wraithan/918042 to your computer and use it in GitHub Desktop.
Save wraithan/918042 to your computer and use it in GitHub Desktop.
// Import libs.
var express = require('express')
var app = express.createServer();
var client = require('redis').createClient();
// setup processing of the body of incoming connections
app.use(express.bodyParser())
// listen on '/' for post requests, store post data in redis queue
app.post('/', function(req, res) {
client.lpush('testqueue', req.body)
});
// listen on port 10000
app.listen(10000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment