# small-router-middleware

> Small router middleware for http.createRequest

Latest version **1.3.0** (published 2015-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install small-router-middleware
pnpm add small-router-middleware
yarn add small-router-middleware
bun add small-router-middleware
```

## 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.3.0 |
| Published | 2015-01-13 |
| First published | 2014-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Lajos Koszti |
| Maintainers | ajnasz |

## Links

- npm: https://www.npmjs.com/package/small-router-middleware
- Repository: https://github.com/Ajnasz/small-router-middleware
- Issues: https://github.com/Ajnasz/small-router-middleware/issues
- npm.io page: https://npm.io/package/small-router-middleware

## Recent versions

- 1.3.0 (latest) — 2015-01-13
- 1.2.0 — 2014-12-07
- 1.1.1 — 2014-12-06
- 1.1.0 — 2014-12-05
- 1.0.0 — 2014-12-05

## README

# small-router-middleware

Small router middleware to handle requests (similar to expresses) 

```
var router = require('small-router-middleware')();

router.get('/foo', function (req, res, next) {
	res.send('foo');
});
router.post('/foo', function (req, res, next) {
	res.send('foo');
});
router.post('/foo/{num}/{word}', function (req, res, next, args) {
	// if called '/foo/123/bar
	// args[0] = '/foo/123/bar
	// args[1] = '123'
	// args[2] = 'bar
	res.send('foo');
});

require('http').createServer(router.route).listen(12345);
```

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