dobbs
dobbs is a routesloader for express that is as opinionated as Prime Overseer Joe Dobbs himself.
Utilizes the furg
Injector to specify dependencies for routes.
var express = ;var dobbs = ; var app = ; var injector = ;injector; path injector ;
Specify a route:
var util = ; var dobbs = ;var Route = dobbsRoute;var MountPoint = dobbsMountPoint; { Route; this_foo = foo;} util; Route1prototype { return 'get' '/route1' ;}; Route1prototype {}; Route1routeName = 'Route1'; moduleexports = Route1;
The second route is preceeded by Route1
:
var util = ; var dobbs = ;var Route = dobbsRoute;var MountPoint = dobbsMountPoint; { Route; this_foo = foo;} util; Route2prototype { return 'get' '/route2' 'Route1';}; Route2prototype {}; Route2routeName = 'Route2'; moduleexports = Route2;
Injected
A route can also be preceeded by a value from the injector:
bootstrap:
var util = ; var dobbs = ;var Route = dobbsRoute;var MountPoint = dobbsMountPoint; var express = ; var app = ; var injector = ;injector;injector; path injector ;
MiddlewareFactory:
var util = ; var dobbs = ; { dobbsInjectorFactory; this_foo = foo;} util; MiddlewareFactoryprototype { return { ... }}; moduleexports = MiddlewareFactory;
Route:
{ Route; this_foo = foo;} util; Route2prototype { return 'get' '/route2' 'middleware';}; Route2prototype {}; Route2routeName = 'Route2'; moduleexports = Route2;