Fork me on GitHub

haiku-http by tjanczuk

Write and run node.js-esque HTTP web APIs in 3 simple steps:
1

Write code

Write an HTTP web API as if you were writing the body of a node.js HTTP request handler:
res.writeHead(200);
res.end('Hello, world!');
          
You can use
req
and
res
globals, utilize the
http
,
https
,
request
, and
net
node.js modules for outbound calls, plus the
mongodb
module for database connectivity. More on programming model... Samples...
2

Run code

Make your code available at a URL where it can be obtained with an HTTP GET request. GitHub or Gist both work great, just remember to use a URL that returns "raw" JavaScript code, not HTML, e.g.:

https://raw.github.com/gist/1848111
https://raw.github.com/tjanczuk/haiku-http/master/samples/haikus/mongo.js

Then put the URL to your code in the text box below and hit Run my code!

http://haiku.cloudapp.net?x-haiku-handler=

The http://haiku.cloudapp.net is an installation of haiku-http runtime on Windows Azure. Haiku-http can run anywhere node.js runs.
3

There is no 3

Haiku-http is an attempt at a sub-process multi-tenant runtime for simple HTTP web APIs. Learn more...

You can find me at @tjanczuk or http://tomasz.janczuk.org

Or you can show moral suppport: