Last active
August 29, 2015 14:00
-
-
Save taka-wang/7835b4d56ded70806e05 to your computer and use it in GitHub Desktop.
naive node app
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 app = express(); | |
app.get('/', function(req, res){ | |
console.log("get /"); | |
res.send('hello world'); | |
}); | |
app.get('/world', function(req, res){ | |
console.log("get /world"); | |
res.send('today is another day!'); | |
}); | |
app.listen(6001, "0.0.0.0"); | |
console.log("listen on port 6001"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment