Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Created November 8, 2009 14:33
Show Gist options
  • Save brianleroux/229300 to your computer and use it in GitHub Desktop.
Save brianleroux/229300 to your computer and use it in GitHub Desktop.
// 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