shelf
shelf copied to clipboard
add a method to group routes and apply specific middleware to this group
add a method to group routes and apply specific middleware to this group
app.chain([simulatedMiddleware]).group('/api/v1', (router) {
for (final sr in simulatedRoutes) {
final method = sr.keys.first.toUpperCase();
final path = sr.values.first;
router.addRoute(method, path, (req, res) => simulatedWork);
}
});