lib/server/apiadapter-mixin.js
function addRoute(method, url, callbacks) {
	debug('adding route (method: `%s`, url: `%s`)', method, url);

	var urlParamKeys = []
		, regexp = urlRegexp(url, urlParamKeys, true, true);

	if(_.isUndefined(this.apiRoutes)) { this.apiRoutes = {}; }
	if(_.isUndefined(this.apiRoutes[method])) { this.apiRoutes[method] = {}; }

	createExpressJsRoute.call(
		this, url, callbacks, this.app[method], this.app
	);

	this.apiRoutes[method][url] = {
		callback: callbacks
		, regexp: regexp
		, keys: urlParamKeys
	};
}
function addRoute(method, url, callbacks) {
	debug('adding route (method: `%s`, url: `%s`)', method, url);

	var urlParamKeys = []
		, regexp = urlRegexp(url, urlParamKeys, true, true);

	if(_.isUndefined(this.apiRoutes)) { this.apiRoutes = {}; }
	if(_.isUndefined(this.apiRoutes[method])) { this.apiRoutes[method] = {}; }

	createExpressJsRoute.call(
		this, url, callbacks, this.app[method], this.app
	);

	this.apiRoutes[method][url] = {
		callback: callbacks
		, regexp: regexp
		, keys: urlParamKeys
	};
}
PrivateFunction: addRoute
The functions generated by <createRouteFactories> use this function to create
an actual api route.

To accomplish this, this creates a concrete Express.JS route which can be
reached via REST HTTP. To make the route callable locally, it gets saved into
the apiRoutes variable.

Parameters:
(String) method - The HTTP method for this route
(String) url - The URL for this route. Gets prepared with <prepareAPIUrl>
(Function)/(Array) callbacks - An API function which should be executed.
If you pass an array with functions, each
function gets executed as it is stacked
upon the array.