Skip to content

Instantly share code, notes, and snippets.

@jcolebrand
Last active December 11, 2015 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcolebrand/3841210adf03f17a6c5c to your computer and use it in GitHub Desktop.
Save jcolebrand/3841210adf03f17a6c5c to your computer and use it in GitHub Desktop.
exports = module.exports = function _SomeController(models) { /* Notice that we are passing in a model "repository" here, where this needs to be documented, but you ask for them by namespace (file layout) */
this.Index = function _index(id) {
ViewBag = {"cole":"is cool"};
ViewBag["id"] = id;
return View();
}
}
exports.config = module.exports.config = {
"Index": ["GET"] /* whereby we can do things at a meta level and add decorators, of a sort */
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment