{"id":21761771,"url":"https://github.com/ionited/mesh","last_synced_at":"2025-07-24T16:33:00.249Z","repository":{"id":177076440,"uuid":"656395145","full_name":"ionited/mesh","owner":"ionited","description":"A fast web framework based on uWebSocket.js","archived":false,"fork":false,"pushed_at":"2025-01-28T18:19:10.000Z","size":234,"stargazers_count":43,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T05:05:47.560Z","etag":null,"topics":["api","backend","express","fiber","http","mesh","rest","socket","uwebsocketsjs","web"],"latest_commit_sha":null,"homepage":"","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/ionited.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"gabrielcursino","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"polar":null,"custom":null}},"created_at":"2023-06-20T21:44:00.000Z","updated_at":"2025-04-04T16:10:59.000Z","dependencies_parsed_at":"2023-07-21T21:32:48.121Z","dependency_job_id":"8b79fa7a-87b6-4063-9fb2-34080d851479","html_url":"https://github.com/ionited/mesh","commit_stats":null,"previous_names":["ionited/fiber","ionited/mesh"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/ionited/mesh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionited%2Fmesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionited%2Fmesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionited%2Fmesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionited%2Fmesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ionited","download_url":"https://codeload.github.com/ionited/mesh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ionited%2Fmesh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266871419,"owners_count":23998262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","backend","express","fiber","http","mesh","rest","socket","uwebsocketsjs","web"],"created_at":"2024-11-26T12:09:43.751Z","updated_at":"2025-07-24T16:33:00.199Z","avatar_url":"https://github.com/ionited.png","language":"TypeScript","funding_links":["https://github.com/sponsors/gabrielcursino"],"categories":[],"sub_categories":[],"readme":"# Mesh\n\n\u003e [!WARNING]\n\u003e **This is Mesh**. A fast web framework based on uWebSocket.js\n\n\u003e [!NOTE]\n\u003e The project was renamed from Fiber to Mesh to avoid confusion with other Web Framework project\n\n## About uWebSockets.js\n\nµWebSockets.js is a web server bypass for Node.js that reimplements eventing, networking, encryption, web protocols, routing and pub/sub in highly optimized C++. As such, µWebSockets.js delivers web serving for Node.js, **[8.5x that of Fastify](https://alexhultman.medium.com/serving-100k-requests-second-from-a-fanless-raspberry-pi-4-over-ethernet-fdd2c2e05a1e)** and at least **[10x that of Socket.IO](https://medium.com/swlh/100k-secure-websockets-with-raspberry-pi-4-1ba5d2127a23)**. It is also the built-in **[web server of Bun](https://bun.sh/)**.\n\n## Quick start\n\n### Install with NPM\n\n```\nnpm i @ionited/mesh\n```\n\n---\n\n## Documentation\n\n### App\n\n```ts\nimport { App } from '@ionited/mesh';\n\nconst app = new App();\n\napp\n\n.use((req, res) =\u003e console.log('Hello World!'))\n\n.catch((e, req, res) =\u003e res.status(e.status ?? 500).json({ message: e.message ?? 'Internal server error' }))\n\n.notFound((req, res) =\u003e res.status(404).end())\n\n.any('/users', (req, res) =\u003e res.json({ success: true }))\n\n.del('/users', (req, res) =\u003e res.json({ success: true }))\n\n.get('/users', (req, res) =\u003e res.json({ success: true }))\n\n.options('/users', (req, res) =\u003e res.json({ success: true }))\n\n.post('/users', (req, res) =\u003e res.json({ success: true }))\n\n.put('/users', (req, res) =\u003e res.json({ success: true }))\n\n.ws('/ws', {\n  close: (ws, code, message) =\u003e {},\n  message: (ws, message) =\u003e {},\n  open: ws =\u003e {}\n})\n\n.listen(1000);\n```\n\n### Router\n\n```ts\nimport { Router } from '@ionited/mesh';\n\nconst router = new Router('/public');\n\nrouter\n\n.use((req, res) =\u003e console.log('Hello World!'))\n\n.any('/users', (req, res) =\u003e res.json({ success: true }))\n\n.del('/users', (req, res) =\u003e res.json({ success: true }))\n\n.get('/users', (req, res) =\u003e res.json({ success: true }))\n\n.options('/users', (req, res) =\u003e res.json({ success: true }))\n\n.post('/users', (req, res) =\u003e res.json({ success: true }))\n\n.put('/users', (req, res) =\u003e res.json({ success: true }))\n\n.ws('/ws', {\n  close: (ws, code, message) =\u003e {},\n  message: (ws, message) =\u003e {},\n  open: ws =\u003e {}\n});\n\nconst routes = router.routes();\n\napp.routes(routes);\n```\n\n### HttpRequest\n\n```ts\ninterface HttpRequest {\n  body(): Promise\u003c{ [key: string]: any }\u003e;\n  data: { [key: string]: any };\n  files(): Promise\u003c{ [key: string]: UploadedFile | undefined }\u003e;\n  headers(): { [key: string]: string };\n  method(): string;\n  params(): { [key: string]: string };\n  query(): { [key: string]: any };\n  route: string;\n  url(): string;\n}\n```\n\n### HttpResponse\n\n```ts\ninterface HttpResponse {\n  end(text?: string): void;\n  header(key: string, value: string): this;\n  json(json: any): void;\n  send(text: string): void;\n  sendFile(path: string): Promise\u003cvoid\u003e;\n  status(status: number): this;\n}\n```\n\n### UploadedFile\n\n```ts\ninterface UploadedFile {\n  data: ArrayBuffer;\n  filename: string;\n  type: string;\n}\n```\n\n### WebSocket\n\n```ts\ninterface WebSocket {\n  send(message: string): void;\n}\n```\n\n### WebSocketBehavior\n\n```ts\nexport interface WebSocketBehavior {\n  close?: (ws: WebSocket, code: number, message: ArrayBuffer) =\u003e void;\n  message?: (ws: WebSocket, message: ArrayBuffer) =\u003e void;\n  open?: (ws: WebSocket) =\u003e void;\n}\n```\n\n## License\n\nCopyright (c) 2023 Ion. Licensed under [MIT License](LICENSE).\n\n[https://ionited.io](https://ionited.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionited%2Fmesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fionited%2Fmesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fionited%2Fmesh/lists"}