{"id":26159923,"url":"https://github.com/zaubrik/composium","last_synced_at":"2025-04-14T11:02:44.411Z","repository":{"id":45457062,"uuid":"508189446","full_name":"Zaubrik/composium","owner":"Zaubrik","description":"Create handlers for Deno.serve. Powered by functional composition and the URL Pattern API.","archived":false,"fork":false,"pushed_at":"2024-05-02T12:26:19.000Z","size":73,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-17T00:05:24.255Z","etag":null,"topics":["compose","deno","functional-programming","router","server","urlpattern"],"latest_commit_sha":null,"homepage":"https://dev.zaubrik.com/url-pattern","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/Zaubrik.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-06-28T06:57:08.000Z","updated_at":"2024-07-11T01:08:23.000Z","dependencies_parsed_at":"2024-03-24T02:31:05.230Z","dependency_job_id":"e01a4a6d-c715-43e9-91c5-94afb94bb0c8","html_url":"https://github.com/Zaubrik/composium","commit_stats":{"total_commits":60,"total_committers":2,"mean_commits":30.0,"dds":0.01666666666666672,"last_synced_commit":"1cb056ec5c06c0f205d3f2a789022b1eaf99fb9a"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fcomposium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fcomposium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fcomposium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zaubrik%2Fcomposium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zaubrik","download_url":"https://codeload.github.com/Zaubrik/composium/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243029153,"owners_count":20224541,"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":["compose","deno","functional-programming","router","server","urlpattern"],"created_at":"2025-03-11T11:39:37.821Z","updated_at":"2025-03-11T11:39:38.507Z","avatar_url":"https://github.com/Zaubrik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# composium\n\nPowered by\n[functional composition](https://en.wikipedia.org/wiki/Function_composition) and\nthe\n[URL Pattern API](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API),\n`composium` has become the most flexible routing framework in the world. Through\nits composability it can serve perfectly as a _generic_, _abstract_ and\n_minimal_ layer for your own back-end framework.\n\n## URL Pattern\n\nThe best way to learn and test the URL Pattern API is Zaubrik's free\n[URL Pattern User Interface](https://dev.zaubrik.com/url-pattern/).\n\n## Documentation\n\n```bash\ndeno doc https://deno.land/x/composium/mod.ts\n```\n\n## Example\n\n```ts\nimport { Context, createDefaultHandler, createGetRoute } from \"./mod.ts\";\n\nfunction welcome\u003cC extends Context\u003e(ctx: C) {\n  const name = ctx.result.pathname.groups.name || \"nobody\";\n  ctx.response = new Response(`Welcome, ${name}!`);\n  return ctx;\n}\n\nconst route = createGetRoute({ pathname: \"/{:name}?\" })(welcome);\nconst handler = createDefaultHandler(route);\n\nDeno.serve(handler);\n\n// curl http://localhost:8080/Joe\n// Welcome, Joe!\n```\n\n## Discord\n\nFeel free to ask questions and start discussions in our\n[discord server](https://discord.gg/6spYphKXAt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaubrik%2Fcomposium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaubrik%2Fcomposium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaubrik%2Fcomposium/lists"}