1.0.0 • Published 6 months ago

express-group-routing v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

Simple Route Grouping in Express using express-group-routing

Quick Start

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

import express from 'express';
import group from 'express-group-routing';

const router = express.Router();

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

In the example above, the group method allows you to easily group routes under the specified prefix (/api/v1 in this case). The nested router within the group function can then have routes defined relative to the specified prefix.

Feel free to explore more features and options provided by express-group-routing to efficiently organize your Express routes.

1.0.0

6 months ago