Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/newtang/expresso
A faster, safer, backwards compatible router alternative for Express.
https://github.com/newtang/expresso
express expressjs node router
Last synced: 28 days ago
JSON representation
A faster, safer, backwards compatible router alternative for Express.
- Host: GitHub
- URL: https://github.com/newtang/expresso
- Owner: newtang
- License: mit
- Created: 2020-06-02T05:36:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T20:18:51.000Z (almost 2 years ago)
- Last Synced: 2024-11-15T05:39:27.138Z (2 months ago)
- Topics: express, expressjs, node, router
- Language: TypeScript
- Homepage:
- Size: 1.28 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# expresso-router
![example workflow name](https://github.com/newtang/expresso/workflows/Node.js%20CI/badge.svg)
A faster, safer, backwards compatible router alternative for Express.
```js
const express = require('express');
const expresso = require('expresso-router');
const router = expresso();router.get('/', function (req, res) {
res.send('Hello World');
});app.use(router);
app.listen(3000);
```## Installation
```sh
npm install expresso-router
```## Features
**Speed**
- [significantly faster than the default Express original router](API.md#Speed), especially for static and parameterized routes**Compatibility**
- highly compatible with Express [APIs](API.md). A drop-in replacement in many cases.
- also compatible with [Node's built in http server](https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener).**Safety**
- Prevents common sources of error by default by throwing easy-to-understand exceptions when creating invalid or overlapping routes
- Disallows suboptimal choices, such as regular expression routes, unless explicitly allowed
- [Order independent](API.md#route-order-independence). The order you add routes shouldn't matter. Expresso will match by specificity.## Documentation and migration information.
[More detailed API documentation](API.md)
## License
[MIT](LICENSE)