Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-group-routes

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-group-routes

Simple way to group routes in Express

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
989
decreased by-12.86%
Maintainers
1
Weekly downloads
 
Created
Source

Express group routes

Simple way to group your routes in Express.

#Quick start

If you want to prefix all routes with a certain URL you can use the group method as following:

var app = require('express');
require('express-group-routes');

app.group("/api/v1", (router) => {
    router.get("/login", loginController.store); // /api/v1/login 
});

In case you don't want to add a prefix but still need to group certain routes you can leave the first parameter and go straight for the function:

var app = require('express');
require('express-group-routes');

app.group((router) => {
    router.use(middleware);
});

#License

MIT

Keywords

FAQs

Package last updated on 23 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc