{"id":15315952,"url":"https://github.com/DarthBenro008/melonpan","last_synced_at":"2025-10-09T02:30:47.275Z","repository":{"id":59506719,"uuid":"513912745","full_name":"DarthBenro008/melonpan","owner":"DarthBenro008","description":"⚡️A minimalistic and sweet router for blazing fast bun","archived":false,"fork":false,"pushed_at":"2022-10-18T19:50:14.000Z","size":442,"stargazers_count":72,"open_issues_count":4,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-20T07:21:02.316Z","etag":null,"topics":["bun","hacktoberfest","hacktoberfest2022","router","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/melonpan","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/DarthBenro008.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-14T13:29:25.000Z","updated_at":"2024-02-26T10:45:45.000Z","dependencies_parsed_at":"2023-01-20T07:47:51.928Z","dependency_job_id":null,"html_url":"https://github.com/DarthBenro008/melonpan","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthBenro008%2Fmelonpan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthBenro008%2Fmelonpan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthBenro008%2Fmelonpan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarthBenro008%2Fmelonpan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DarthBenro008","download_url":"https://codeload.github.com/DarthBenro008/melonpan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235785415,"owners_count":19044557,"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","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":["bun","hacktoberfest","hacktoberfest2022","router","typescript"],"created_at":"2024-10-01T08:52:50.531Z","updated_at":"2025-10-09T02:30:41.989Z","avatar_url":"https://github.com/DarthBenro008.png","language":"TypeScript","funding_links":[],"categories":["Extensions"],"sub_categories":["Libraries"],"readme":"![banner](assets/banner.png)\n![release](https://img.shields.io/github/v/release/DarthBenro008/melonpan)\n[![GitHub License](https://img.shields.io/github/license/darthbenro008/melonpan)](https://github.com/DarthBenro008/melonpan/blob/master/LICENSE)\n[![PRs Welcome](https://img.shields.io/npm/v/melonpan)](https://www.npmjs.com/package/melonpan)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/DarthBenro008/melonpan/issues/new/choose)\n\n\u003cp align=\"center\"\u003e \u003cb\u003eMelonpan\u003c/b\u003e is a simple and minimalistic web-router designed to work with \u003cb\u003eBun\u003c/b\u003e, keeping performance in mind. \u003c/p\u003e\n\n## 🤔 Why Melonpan?\n\n- **no/minimal** learning curve\n- **Developer focused**, you just need to focus on buisness logic\n- **0 bloat functions**\n- **0 dependencies**\n- **100% Typescript code**\n- Blazing fast performance than node webframework alternatives\n\n## ⚡️ Quickstart\n\n```typescript\nimport { Melonpan, MelonRouter } from \"melonpan\";\n\nconst melonpan = new Melonpan();\n// Simple middleware definitions\nmelonpan.middleware((_req, ctx, next) =\u003e {\n    console.log(\"A middleware has been hit!\")\n})\n// Easy query params parsing!\nmelonpan.get(\"/api/:id\", (_req, ctx) =\u003e {\n    return ctx.json({\"id\": ctx.params.id}, 200);\n})\n// Routing done in very simple manner\nmelonpan.get(\"/\" , (_req, ctx) =\u003e ctx.text(\"Hello world!\"));\n\n// Easy definitions of routers and handlers!\nconst melonRouter = new MelonRouter();\nmelonRouter.get(\"/bar\", (_req, ctx) =\u003e ctx.text(\"this is a router\", 200));\nmelonpan.use(\"/foo\", melonRouter);\n\nexport default {\n    port: 3000,\n    fetch(req: Request){\n        return melonpan.serve(req);\n    }\n}\n```\n\n## 🤖 Benchmarks\n\nThe following results are of: \n- **Test:** Bun `(v0.1.11)` + Melonpan `(v0.1.0)` **Vs** NodeJS `(v16.13.0)` + Express `(v4.18.1)`\n- **Machine:** MacBook M1 Pro 16GB RAM\n- **Benchmarking tool used:** [Autocannon](https://github.com/mcollina/autocannon)\n\n### Results\n\n![benchmark](assets/bench.png)\n\n\u003e **Almost an 8x performance, thanks to Bun.**\n\nYou can find the [benchmark suite here](https://github.com/DarthBenro008/melonpan/tree/main/bench)\n\n\n## ⬇️ Installation\n\n### Using Bun\n\n1. Install Bun  \n```bash\ncurl https://bun.sh/install | bash\n```\n2. Add Melonpan as dependency using bun  \n```bash  \nbun add melonpan\n```\n\n### Using Yarn\n\n```bash\nyarn add melonpan\n```\n\n### Using NPM\n\n```bash\nnpm install melonpan\n```\n\n## 🤝 Contributions\n\n- Feel Free to Open a PR/Issue for any feature or bug(s).\n- Make sure you follow the [community guidelines](https://docs.github.com/en/github/site-policy/github-community-guidelines).\n- Feel free to open an issue to ask a question/discuss anything about melonpan.\n- Have a feature request? Open an Issue!\n- Please ensure to run `bun test` before submitting your PRs!\n\n### 📢 Shoutouts\n\nShoutout to [Khyati Gupta](https://www.behance.net/khyatigupta267) for amazing logo and banner illustrations\n\n## ⚖ License\n\nCopyright 2022 Hemanth Krishna\n\nLicensed under MIT License : https://opensource.org/licenses/MIT\n\n\u003cp align=\"center\"\u003eMade with ❤ , multiple cups of coffee and some chaii\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDarthBenro008%2Fmelonpan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDarthBenro008%2Fmelonpan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDarthBenro008%2Fmelonpan/lists"}