Skip to content

Instantly share code, notes, and snippets.

@rsaccon rsaccon/gist:126711
Created Jun 9, 2009

Embed
What would you like to do?
var File = require("jack/file").File,
ContentLength = require("jack/contentlength").ContentLength,
ShowExceptions = require("jack/showexceptions").ShowExceptions,
Lint = require("jack/lint").Lint,
Cascade = require("jack/cascade").Cascade;
var Nitro = require("nitro").Nitro,
Dispatch = require("nitro/middleware/dispatch").Dispatch,
Normalize = require("nitro/middleware/normalize").Normalize,
Render = require("nitro/middleware/render").Render;
var Domains = require("app/middleware/domains").Domains;
exports.app = ContentLength(Normalize(Render(Dispatch())));
// The default jackup environment is 'development'.
exports.development = function(app) {
return Nitro(ShowExceptions(Lint(app)));
}
// The default gae environment is 'gae'.
exports.gae = function(app) {
// Override defaults.
global.CONFIG = {
srcPath: "WEB-INF/src",
templateRoot: "WEB-INF/src/root",
}
return Cascade([
File("static"),
Nitro(app)
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.