Created
May 14, 2011 10:43
-
-
Save nazgob/972106 to your computer and use it in GitHub Desktop.
hello world of express framework
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 express = require("express"); | |
var server = express.createServer(); | |
server.get('/', function(req, res) { | |
console.log(req); | |
console.log(res); | |
res.send("hello express"); | |
}); | |
server.get('/users/:id', function(req, res) { | |
res.send(req.params.id); | |
}); | |
server.listen(8000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment