routup 🧙

Routup is a lightweight and extendable http interface based routing framework.
It uses node's vanilla request and response interfaces, which are injected into route handlers aka middlewares as function argument.
Helpers provide additional functionalities to transform and interact with the request and manipulate the response upstream.
Table of Contents
Installation
npm install routup --save
Features
- 🚀 high performance routing
- 🧰 response & request helpers/utilities
- 💼 extendable & compact
- 🛫 named route parameters
- 📁 nestable routers
- 😌 define one or many (error-) middlewares
- ✨ promise support for route- & middleware-handlers
- 👕 TypeScript fully supported
- 🤏 Minimalistic to fit into any solution with minimum overhead
- & much more
Documentation
To read the docs, visit https://routup.net
Usage
import { Router, send } from 'routup';
const router = new Router();
router.get('/', (req, res) => {
send(res, 'Hello World');
});
router.listen(3000);
Plugins
According to the fact that routup is a minimalistic framework, it depends on plugins to cover some
typically http framework functions, which are not integrated in the main package.
| body | Read and parse the request body. |
| cookie | Read and parse request cookies and serialize cookies for the response. |
| decorators | Create request handlers with class-, method- & parameter-decorators. |
| prometheus | Collect and serve metrics for prometheus. |
| query | Read and parse the query string of the request url. |
| rate-limit | Rate limit incoming requests. |
| rate-limit-redis | Redis adapter for the rate-limit plugin. |
| static | Serve static files from a directory. |
| swagger | Serve generated docs from URL or based on a JSON file. |
License
Made with 💚
Published under MIT License.