brianleroux (owner)

Revisions

gist: 229300 Download_button fork
public
Public Clone URL: git://gist.github.com/229300.git
Embed All Files: show embed
cramda-node.js #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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/');