# aliez-match

> aliez route matcher

Latest version **1.1.3** (published 2016-06-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install aliez-match
pnpm add aliez-match
yarn add aliez-match
bun add aliez-match
```

## 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.1.3 |
| Published | 2016-06-09 |
| First published | 2016-05-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wallax |
| Maintainers | wallax |
| Keywords | web, server, aliez, http, route, rule |

## Links

- npm: https://www.npmjs.com/package/aliez-match
- Repository: https://git.coding.net/wallax/aliez-match
- npm.io page: https://npm.io/package/aliez-match

## Dependencies (1)

- [aliez](https://npm.io/package/aliez.md) *

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 1.1.3 (latest) — 2016-06-09
- 1.1.2 — 2016-05-08

## README

# aliez-match

aliez路由规则匹配

## 用法

```
var aliez = require('aliez'), http = require('http');
var aliez_match = require('aliez-match');

var app = aliez(function(req, res){
	// 纯字符串匹配
	req.match('/', function(req, res){
		res.end('hello world');
	});
	
	// 使用正则表达式
	req.match(/^\/image\/([a-zA-Z0-9]*)/, function(req, res){
		// 匹配结果
		res.end('image:' + req.REQUEST[0]);
	});
	
	// 使用字符串模板
	req.match('/tag/$tag/page/$page', function(req, res){
		// 匹配结果
		res.end('tag:' + req.REQUEST.tag + ' page:' + req.REQUEST.page);
	});
});

app.use(aliez_match);

http.createServer(app).listen(8080);
```

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