Created
April 13, 2011 18:07
-
-
Save wraithan/918042 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
// 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