{"id":20094583,"url":"https://github.com/denostack/dewy","last_synced_at":"2026-05-12T17:42:48.463Z","repository":{"id":65200962,"uuid":"584718510","full_name":"denostack/dewy","owner":"denostack","description":"Dewy(dǝw-y) is a minimalist HTTP server framework with a small codebase, utilizing built-in URLPattern for efficient routing.","archived":false,"fork":false,"pushed_at":"2023-05-10T16:54:45.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-04T21:32:01.456Z","etag":null,"topics":["deno","http-server","restful","urlpattern","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/denostack.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,"publiccode":null,"codemeta":null}},"created_at":"2023-01-03T10:39:00.000Z","updated_at":"2023-01-12T04:07:43.000Z","dependencies_parsed_at":"2024-11-13T16:51:31.916Z","dependency_job_id":"05f6af2c-3e80-4cfe-9602-889cf0b57fcc","html_url":"https://github.com/denostack/dewy","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denostack%2Fdewy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denostack%2Fdewy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denostack%2Fdewy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denostack%2Fdewy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denostack","download_url":"https://codeload.github.com/denostack/dewy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241533639,"owners_count":19977826,"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":["deno","http-server","restful","urlpattern","web"],"created_at":"2024-11-13T16:51:17.677Z","updated_at":"2026-05-12T17:42:48.418Z","avatar_url":"https://github.com/denostack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dewy \u003ca href=\"https://github.com/denostack\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/denostack/images/main/logo.svg\" width=\"160\" align=\"right\" /\u003e\u003c/a\u003e\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/denostack/dewy/actions\"\u003e\u003cimg alt=\"Build\" src=\"https://img.shields.io/github/actions/workflow/status/denostack/dewy/ci.yml?branch=main\u0026logo=github\u0026style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/denostack/dewy\"\u003e\u003cimg alt=\"Coverage\" src=\"https://img.shields.io/codecov/c/gh/denostack/dewy?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/npm/l/dewy.svg?style=flat-square\" /\u003e\n  \u003cimg alt=\"Language Typescript\" src=\"https://img.shields.io/badge/language-Typescript-007acc.svg?style=flat-square\" /\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://deno.land/x/dewy\"\u003e\u003cimg alt=\"deno.land/x/dewy\" src=\"https://img.shields.io/badge/dynamic/json?url=https://api.github.com/repos/denostack/dewy/tags\u0026query=$[0].name\u0026display_name=tag\u0026label=deno.land/x/dewy@\u0026style=flat-square\u0026logo=deno\u0026labelColor=000\u0026color=777\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/dewy\"\u003e\u003cimg alt=\"Version\" src=\"https://img.shields.io/npm/v/dewy.svg?style=flat-square\u0026logo=npm\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://npmcharts.com/compare/dewy?minimal=true\"\u003e\u003cimg alt=\"Downloads\" src=\"https://img.shields.io/npm/dt/dewy.svg?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nDewy(dǝw-y) is a minimalist HTTP server framework with a small codebase,\nutilizing built-in URLPattern for efficient routing.\n\n## Usage\n\n### with Deno\n\n```ts\nimport { Router } from \"https://deno.land/x/dewy/mod.ts\";\n\nconst router = new Router();\n\nrouter.get(\"/\", () =\u003e {\n  return Response.json({\n    message: \"Hello World\",\n  });\n});\nrouter.get(\"/articles/:id\", ({ match }) =\u003e {\n  return Response.json({\n    id: match.pathname.groups.id,\n  });\n});\n\nDeno.serve(router.dispatch.bind(router), {\n  port: 8080,\n});\n```\n\n```bash\ndeno run --allow-net --unstable server.ts\n```\n\nIn addition to using `Deno.serve`, you can also use the HTTP server from the\nstandard library by importing `https://deno.land/std@0.167.0/http/server.ts`.\n\nHere is an example:\n\n```ts\nimport { serve } from \"https://deno.land/std@0.167.0/http/server.ts\";\n\n/* ... */\n\nserve(router.dispatch.bind(router), {\n  port: 8080,\n});\n```\n\nUsing the HTTP server from the standard library allows you to deploy your\napplication to a Deno Deploy environment.\n\n### with NPM\n\n```bash\nnpm install dewy\n```\n\n## Middlewares\n\n**CORS**\n\nThe cors middleware from dewy allows you to easily add CORS (Cross-Origin\nResource Sharing) support to your routes.\n\n```ts\nimport { cors } from \"https://deno.land/x/dewy/middlewares/cors.ts\";\n\nrouter.addRoute({\n  method: [\"GET\", \"POST\", \"OPTIONS\", \"CUSTOMMETHOD\"],\n  pattern: \"/cors\",\n  middleware: cors({\n    allowMethods: [\"POST\", \"CUSTOMMETHOD\"],\n  }),\n}, () =\u003e {\n  return Response.json({ success: true });\n});\n```\n\n## See Also\n\n- [rutt](https://github.com/denosaurs/rutt) Rutt is a http router for deno, fast\n  route matching with `URLPatterns`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenostack%2Fdewy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenostack%2Fdewy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenostack%2Fdewy/lists"}