Created
September 25, 2010 02:49
-
-
Save dmachi/596400 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 nodes = multiNode.listen({port: settings.port || 8080, nodes: settings.processes || 1}, | |
require( "http" ).createServer( | |
require("jsgi-node").Listener( | |
// uncomment this to enable compression with node-compress | |
//require("pintura/jsgi/compress").Compress( | |
// make the root url redirect to /Page/Root | |
require("pintura/jsgi/rewriter").Rewriter("\/$", "/page/test", | |
require("pintura/jsgi/cascade").Cascade([ | |
// cascade from static to pintura REST handling | |
// the main place for static files accessible from the web | |
Static({urls:[""], root: "public", directoryListing: true}), | |
Static({urls:["/explorer"], root: require("nodules").getCachePath("persevere-client/") + "/explorer"}), | |
// this will provide access to the server side JS libraries from the client | |
require("transporter/jsgi/transporter").Transporter({ | |
loader: require("nodules").forEngine("browser").useLocal().getModuleSource}), | |
// main pintura app | |
function(request){ | |
return pinturaApp(request); | |
} | |
]) | |
) | |
//) | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment