nl_tokens: PrivateFunction : addRoute The functions generated by <createRouteFactories > use this function to create an actual api route .
pl_tokens: 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 ] = { <mask> : callbacks , regexp : regexp , keys : urlParamKeys } ; }