Created
September 7, 2010 22:11
-
-
Save vitohuang/569233 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 haml = require('hamljs'); var app = require('express').createServer(); | |
var express = require('express'); | |
app.configure('development', function() { | |
app.use(express.methodOverride()); | |
app.use(app.router); | |
app.use(express.logger()); | |
app.use(express.bodyDecoder()); | |
app.use(express.staticProvider(__dirname+'/public')); | |
}); | |
app.get("/", function(req,res) { | |
console.log("A client connected to this HTTP server"); | |
res.send("Bye"); | |
}); | |
app.post("/post", function(req, res) { | |
console.log("A post message"); | |
console.dir(req); | |
console.log("get the incoming name"); | |
console.log(req.param.name); | |
res.send("end of post"); | |
}); | |
app.listen(8888); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Few notes: