nl_tokens: convenience method to define a restify route
pl_tokens: function defineRoute ( method , route , handler ) { server [ method ] ( route , function ( req , res ) { var store = stores . get ( req . params . resource ) ; <mask> req . params . resource ; handler ( req , store , function ( error , docs ) { if ( error ) { res . status ( 500 ) ; res . end ( error ) ; } else if ( ! docs ) { res . status ( 404 ) ; res . end ( "Not found" ) ; } else { res . json ( docs ) ; } } ) ; } ) ; }