Skip to content

Instantly share code, notes, and snippets.

@dmachi
Created September 25, 2010 02:49
Show Gist options
  • Save dmachi/596400 to your computer and use it in GitHub Desktop.
Save dmachi/596400 to your computer and use it in GitHub Desktop.
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