-
-
Save dustinmyers/b2c13b80e10d7cb2d06f 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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery.js"></script> | |
<script> | |
$(function() { | |
$.get('http://localhost:3000') | |
}); | |
</script> | |
</head> | |
</html> |
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 onRequest = function(req, res) { | |
res.writeHead(200, { | |
'Connection': 'close', | |
'Content-Type': 'text/html' | |
}); | |
res.end('<h1>Hello world</h1>'); | |
} | |
http = require('http'); | |
http.createServer(onRequest).listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment