lib/server/apiadapter-mixin.js
function createExpressJsCallback(successHandler, errorHandler, callbacks) {
	debug('creating express.js callback');

	return function handler(req, res) {
		debug('express.js callback called for url `%s`', req.url);

		processCallbacks(
			_.values(req.params)
			, req.body
			, req
			, res
			, successHandler
			, errorHandler
			, callbacks);
	};
}
function createExpressJsCallback(successHandler, errorHandler, callbacks) {
	debug('creating express.js callback');

	return function handler(req, res) {
		debug('express.js callback called for url `%s`', req.url);

		processCallbacks(
			_.values(req.params)
			, req.body
			, req
			, res
			, successHandler
			, errorHandler
			, callbacks);
	};
}
Function: createExpressJsCallback
Encapsulates given callback function or an array with stacked callback
functions and prepares it so it can be registered as an express js route.

The two functions successHandler and errorHandler are passed to the callback
on runtime as the first two arguments.

Parameters:
(Function) successHandler - A function which is injected as the first
argument when executing the callback
(Function) errorHandler - A function which is injected as the second
argument when executing the callback
(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.

Returns:
(Function) to be registered with express js.

See also:
* <processCallbacks>