Created
November 21, 2010 14:19
-
-
Save jfsiii/708767 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
[jfsiii@web165 node_flot]$ cat index.js | |
var http = require('http'), ip = "127.0.0.1", port = 41205; | |
http.createServer(function (req, res) | |
{ | |
console.log('request received'); | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('NodeJS on JSNo.de!\n'); | |
}).listen(port); | |
console.log('Server running at http://'+ip+':'+port+'/'); | |
[jfsiii@web165 node_flot]$ node index.js & | |
[1] 27161 | |
[jfsiii@web165 node_flot]$ Server running at http://127.0.0.1:41205/ | |
[jfsiii@web165 node_flot]$ curl -i 'http://jsno.de:41205' | |
curl: (7) couldn't connect to host | |
[jfsiii@web165 node_flot]$ curl -i 'http://jsno.de' | |
HTTP/1.1 200 OK | |
Server: nginx | |
Date: Sun, 21 Nov 2010 14:15:46 GMT | |
Content-Type: text/html | |
Connection: keep-alive | |
Last-Modified: Sun, 21 Nov 2010 00:19:39 GMT | |
ETag: "e90617-c-4958518605cc0" | |
Accept-Ranges: bytes | |
Content-Length: 12 | |
Hello, world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment