# express-group-routing

> ## Quick Start

Latest version **1.0.0** (published 2023-11-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install express-group-routing
pnpm add express-group-routing
yarn add express-group-routing
bun add express-group-routing
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-11-14 |
| First published | 2023-11-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ebrahim Nayakkan |
| Maintainers | ebrunkn |

## Links

- npm: https://www.npmjs.com/package/express-group-routing
- npm.io page: https://npm.io/package/express-group-routing

## Dependencies (1)

- [express](https://npm.io/package/express.md) ^4.18.2

## Recent versions

- 1.0.0 (latest) — 2023-11-14

## README

# 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:

```javascript
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.

---
_Source: https://npm.io/package/express-group-routing · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
