An extension to Express server to add grouping functionality
Using underscore or lodash you can now extend your express.js application to now include route grouping. Group routes with a prefix. For example if you wanted to group all your API routes, you can now do so. Have a look at the example below for how to implement.
var express = require'express';var _ = require"underscore";var app = express;_extendapp require"expressgroup"app;appget"/"resrender"home";;appgroupprefix:"/api/v1"// defaults to GET method// this route will be available at host:port/api/v1/foorouteurl:"/foo"ressend"foo";;// methods can be any of the HTTP methods commonly used// the route will be available at host:port/api/v1/helloroutemethod:"get" url:"/hello"ressend"hello world";;;applisten3000;