Skip to content

Instantly share code, notes, and snippets.

@hns
Created October 29, 2010 19:50
Show Gist options
  • Save hns/654266 to your computer and use it in GitHub Desktop.
Save hns/654266 to your computer and use it in GitHub Desktop.
// this is just a JSGI application like it used to be
var app = exports.app = new Application();
// delegate requests to other apps/modules exporting their own JSGI app
app.route({vhost: ["foo.com", "*.foo.com"]}, "foo/config");
app.route("/admin/", "admin");
app.route("/", "actions");
// method-specific mapping of requests to controller/action functions
app.get("/", function() {});
app.post"/", function() {});
app.get("/:item", function() {});
app.get("/*.*", function() {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment