lib/server/apiadapter-mixin.js
function matchRoute(method, url, apiRoutes, params) {
	debug('matching route method %s with url %s', method, url);

	var routes = apiRoutes[method]
		, matchedRoute;

	for(var routeUrl in routes) {
		var route = routes[routeUrl]
			, keys = route.keys
			, match = route.regexp.exec(url);

		if(match) {
			matchedRoute = route;
			extractParams(match, keys, params);
			break;
		}
	}
	debug('matched route `%j`', matchedRoute);

	return matchedRoute;
}
function matchRoute(method, url, apiRoutes, params) {
	debug('matching route method %s with url %s', method, url);

	var routes = apiRoutes[method]
		, matchedRoute;

	for(var routeUrl in routes) {
		var route = routes[routeUrl]
			, keys = route.keys
			, match = route.regexp.exec(url);

		if(match) {
			matchedRoute = route;
			extractParams(match, keys, params);
			break;
		}
	}
	debug('matched route `%j`', matchedRoute);

	return matchedRoute;
}
PrivateFunction: matchRoute
This function takes an HTTP method and a URL. It tries to match any API route
contained in apiRoutes. If a route is found, the routes regex is used to
extract any parameters from the URL. These parameters are contained in the
params argument afterwards.

The actual matched route gets returned if found.

Thanks to:
* https://github.com/visionmedia/express/blob/master/lib/router/route.js#L50

Parameters:
(String) method - An HTTP method verb
(String) url - The URL to match a route for
(Object) apiRoutes - An object containing all api routes too look after
(Object) params - An object which will contain all extracted parameters
from url, if a route matched.

Returns:
(Object) containing all information about the matched api route. Dont
forget that the params argument will contain any extracted
parameters from the url!