Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
app.all('/:controller/:action/:id?', function(req, res) {
require(['app/controller/' + req.params.controller], function(Controller) {
Controller[req.params.action](req, res);
});
});
app.all('/:controller', function(req, res) {
require(['app/controller/' + req.params.controller], function(Controller) {
Controller.index(req, res);
});
});
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.