{"id":42876407,"url":"https://github.com/routup/routup","last_synced_at":"2026-01-30T14:03:01.383Z","repository":{"id":62917087,"uuid":"562090528","full_name":"routup/routup","owner":"routup","description":"A fast, lightweight, runtime agnostic and asynchronous routing framework.","archived":false,"fork":false,"pushed_at":"2025-11-21T14:07:18.000Z","size":6608,"stargazers_count":33,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-11-23T12:12:20.054Z","etag":null,"topics":["api","http","http-server","middleware","nodejs","rest","route","router","routing","runtime-agnostic","server","typescript","web","web-framework"],"latest_commit_sha":null,"homepage":"https://routup.net","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/routup.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["tada5hi"]}},"created_at":"2022-11-05T09:28:26.000Z","updated_at":"2025-07-31T14:05:39.000Z","dependencies_parsed_at":"2024-05-03T16:09:16.124Z","dependency_job_id":"d65cbe8a-dfe1-4fbb-9a08-cfcb9798f693","html_url":"https://github.com/routup/routup","commit_stats":{"total_commits":628,"total_committers":3,"mean_commits":"209.33333333333334","dds":0.5079617834394905,"last_synced_commit":"ee78d2b1fbf725bc2c6891475bb542f008c3edf0"},"previous_names":["tada5hi/routup"],"tags_count":134,"template":false,"template_full_name":null,"purl":"pkg:github/routup/routup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routup%2Froutup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routup%2Froutup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routup%2Froutup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routup%2Froutup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/routup","download_url":"https://codeload.github.com/routup/routup/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/routup%2Froutup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28913903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","http","http-server","middleware","nodejs","rest","route","router","routing","runtime-agnostic","server","typescript","web","web-framework"],"created_at":"2026-01-30T14:02:58.757Z","updated_at":"2026-01-30T14:03:01.366Z","avatar_url":"https://github.com/routup.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n[![Routup banner](./.github/assets/banner.png)](https://routup.net)\n\n\u003c/div\u003e\n\n# Routup 🧙‍\n\n[![npm version](https://badge.fury.io/js/routup.svg)](https://badge.fury.io/js/routup)\n[![main](https://github.com/Tada5hi/routup/actions/workflows/main.yml/badge.svg)](https://github.com/Tada5hi/routup/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/tada5hi/routup/branch/master/graph/badge.svg?token=CLIA667K6V)](https://codecov.io/gh/tada5hi/routup)\n[![Known Vulnerabilities](https://snyk.io/test/github/Tada5hi/routup/badge.svg)](https://snyk.io/test/github/Tada5hi/routup)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits\u0026logoColor=white)](https://conventionalcommits.org)\n\n**Routup** is a fast, lightweight, runtime agnostic and asynchronous routing framework.\nHelpers provide additional functionalities to interact with the request and manipulate the response.\n\nIt can be used independently of the selected runtime environment (Node.Js, Bun, ... ) 🎉.\nMoreover, it is even **228%** faster than Express ([more](#benchmarks)).\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Features](#features)\n- [Documentation](#documentation)\n- [Usage](#usage)\n- [Plugins](#plugins)\n- [Benchmarks](#benchmarks)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n```bash\nnpm install routup --save\n```\n\n## Features\n\n- 🚀 runtime agnostic (Node.JS, Bun, Deno, ...)\n- 📝 different handler types (base \u0026 error)\n- ✨ promise (async) support for core- \u0026 error-handlers\n- 📌 robust hook system\n- 🔌 powerful plugin system\n- 🧰 tree shakeable response \u0026 request helpers\n- 🤝️ different handler declaration styles (shorthand \u0026 verbose)\n- 📁 nestable routers\n- 👕 TypeScript support\n- 🤏 minimalistic to fit into any solution with minimum overhead\n- \u0026 much more\n\n## Documentation\n\nTo read the docs, visit [https://routup.net](https://routup.net)\n\n## Usage\n\nThe following examples are intended to give a small insight into the use of the framework.\nHowever, it is highly recommended to read the [documentation](https://routup.net), \nas all concepts and basics are taught there.\n\n### Handlers\n\nBoth core and error handlers, can be defined in two different ways.\nCore handler functions can have up to 3 arguments (req, res, next) whereas error handler functions can have up to 4 arguments (err, req, res, next).\nThis should be familiar to anyone who has used express before.\n\n**`Shorthand`**\n\nWith the shorthand variant, \nonly the handler function is passed as argument to the **coreHandler** \u0026 **errorHandler** function.\n\n```typescript\nimport { createServer } from 'node:http';\nimport {\n    coreHandler,\n    createNodeDispatcher,\n    errorHandler,\n    Router,\n    useRequestParam\n} from 'routup';\n\nconst router = new Router();\n\nrouter.get('/', coreHandler(() =\u003e 'Hello, World!'));\nrouter.get('/greet/:name', coreHandler((req) =\u003e `Hello, ${useRequestParam(req, 'name')}!`));\nrouter.use(errorHandler((err) =\u003e `An error with statusCode ${err.statusCode} occured.`));\n\nconst server = createServer(createNodeDispatcher(router));\nserver.listen(3000)\n```\n\n**`Verbose`**\n\nThe verbose variant is more complex, but offers the possibility to set additional information\nlike **path**, **method**, ... in the handler definition.\n\n```typescript\nimport { createServer } from 'node:http';\nimport {\n    coreHandler,\n    createNodeDispatcher,\n    errorHandler,\n    Router,\n    useRequestParam\n} from 'routup';\n\nconst router = new Router();\n\nrouter.get(coreHandler({\n    path: '/',\n    fn: () =\u003e 'Hello, World!',\n}));\n\nrouter.get(coreHandler({\n    path: '/greet/:name',\n    fn: (req) =\u003e `Hello, ${useRequestParam(req, 'name')}!`\n}))\n\nrouter.use(errorHandler({\n    fn: (err) =\u003e `An error with statusCode ${err.statusCode} occured.`\n}))\n\nconst server = createServer(createNodeDispatcher(router));\nserver.listen(3000)\n```\n\n### Runtimes\n\nIt is possible to use any javascript runtime environment. Below are examples for Bun and Deno.\nThese use the web dispatcher to submit requests based on the web api. Besides the node- \u0026 web-dispatcher, \nthere is also a plain dispatcher that underlies the web dispatcher, which can be controlled via a simple API.\n\n**`Bun`**\n\n```typescript\nimport {\n    coreHandler,\n    createWebDispatcher,\n    Router\n} from 'routup';\n\nconst router = new Router();\n\nrouter.get('/', coreHandler(() =\u003e 'Hello, World!'));\n\nconst dispatch = createWebDispatcher(router);\n\nBun.serve({\n    async fetch(request) {\n        return dispatch(request);\n    },\n    port: 3000,\n});\n```\n\n**`Deno`**\n\n```typescript\nimport {\n    coreHandler,\n    createWebDispatcher,\n    Router\n} from 'routup';\n\nconst router = new Router();\n\nrouter.get('/', coreHandler(() =\u003e 'Hello, World!'));\n\nconst dispatch = createWebDispatcher(router);\n\nconst server = Deno.listen({\n    port: 3000\n});\nfor await (const conn of server) {\n    const httpConn = Deno.serveHttp(conn);\n\n    for await (const requestEvent of httpConn) {\n        const response = await dispatch(\n            requestEvent.request\n        );\n        requestEvent.respondWith(response);\n    }\n}\n```\n\n## Plugins\n\nAccording to the fact that routup is a minimalistic framework, \nit depends on [plugins](https://github.com/routup/plugins) to cover some \ntypically http framework functions, which are not integrated in the main package.\n\n| Name                                                                                        | Description                                                            |\n|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------|\n| [assets](https://github.com/routup/plugins/tree/master/packages/assets)                     | Serve static files from a directory.                                   |\n| [basic](https://github.com/routup/plugins/tree/master/packages/basic)                       | Bundle of the body, cookie and query plugin.                           |\n| [body](https://github.com/routup/plugins/tree/master/packages/body)                         | Read and parse the request body.                                       |\n| [cookie](https://github.com/routup/plugins/tree/master/packages/cookie)                     | Read and parse request cookies and serialize cookies for the response. |\n| [decorators](https://github.com/routup/plugins/tree/master/packages/decorators)             | Create request handlers with class-, method- \u0026 parameter-decorators.   |\n| [prometheus](https://github.com/routup/plugins/tree/master/packages/prometheus)             | Collect and serve metrics for prometheus.                              |\n| [query](https://github.com/routup/plugins/tree/master/packages/query)                       | Read and parse the query string of the request url.                    |\n| [rate-limit](https://github.com/routup/plugins/tree/master/packages/rate-limit)             | Rate limit incoming requests.                                          |\n| [rate-limit-redis](https://github.com/routup/plugins/tree/master/packages/rate-limit-redis) | Redis adapter for the rate-limit plugin.                               |\n| [swagger](https://github.com/routup/plugins/tree/master/packages/swagger)                   | Serve generated docs from URL or based on a JSON file.                 |\n\n## Benchmarks\n\n* CPUs:  `24`\n* RAM:  `63.9GB`\n* Node: `v18.16.0`\n* Date:  `Wed Sep 13 2023 15:11:58 GMT+0200 (Mitteleuropäische Sommerzeit) `\n* Method: `autocannon -c 100 -d 40 -p 10 localhost:3000` (two rounds; one to warm-up, one to measure)\n\n| Package    | Requests/s  | Latency (ms) | Throughput/MB |\n|:-----------|:-----------:|-------------:|--------------:|\n| http       |    61062    |        15.87 |         10.89 |\n| fastify    |    59679    |        16.26 |         10.70 |\n| koa        |    45763    |        21.35 |          8.16 |\n| **routup** |    44588    |        21.91 |          9.02 |\n| hapi       |    41374    |        23.67 |          7.38 |\n| express    |    13376    |        74.18 |          2.39 |\n\nBenchmarks were generated using autocannon. \nTo recreate the results, this can be done using the [benchmarks'](https://github.com/routup/benchmarks) repository.\n## Contributing\n\nBefore starting to work on a pull request, it is important to review the guidelines for\n[contributing](./CONTRIBUTING.md) and the [code of conduct](./CODE_OF_CONDUCT.md).\nThese guidelines will help to ensure that contributions are made effectively and are accepted.\n\n## License\n\nMade with 💚\n\nPublished under [MIT License](./LICENSE).\n","funding_links":["https://github.com/sponsors/tada5hi"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froutup%2Froutup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froutup%2Froutup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froutup%2Froutup/lists"}