-
-
Save kriszyp/434508 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
var pinturaNodeApp = require("jsgi-node").Listener(pinturaApp); | |
run: () -> | |
http: require 'http' | |
server: http.createServer (request, response) -> | |
#sys.debug sys.inspect request | |
# separate handlers for high-load paths | |
if request.url is '/hello' | |
hello.call response | |
else if request.url is '/test' | |
redirector.call response, rnd() | |
else if request.url is '/install' | |
install.call response, rnd() | |
# delegate all the rest to pintura | |
else | |
pinturaNodeApp(request,response); | |
server.listen (settings.port or 80) | |
sys.puts 'Server running at http://127.0.0.1:' + (settings.port or 80) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Downloading http://waitdownload.github.com/kriszyp-jsgi-node-v0.1.1-1-gde4f3e8.zip
/home/dvv/IRC/nodules/lib/nodules-utils/promise.js:186
throw error;
^
Error: Array.prototype.toString is not generic failed to load jar:http://github.com/kriszyp/jsgi-node/zipball/master!/lib/jsgi-node.js
at Object. (/home/dvv/IRC/nodules/lib/nodules.js:297:13)