Created
November 8, 2009 14:33
-
-
Save brianleroux/229300 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// node.js with cramda syntax | |
// -------------------------- | |
// cramda history for your reference: | |
// http://alex.dojotoolkit.org/2009/05/on-js-lambdas/ | |
// http://james.padolsey.com/javascript/custom-javascript-with-parsescripts/ | |
var sys = require('sys'); | |
var http = require('http'); | |
http.createServer(#(req, res) { | |
setTimeout(#() { | |
res.sendHeader(200, {'Content-Type': 'text/plain'}); | |
res.sendBody('Hello World'); | |
res.finish(); | |
}, 2000); | |
}).listen(8000); | |
sys.puts('Server running at http://127.0.0.1:8000/'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment