{"id":14155184,"url":"https://github.com/nhttp/nhttp","last_synced_at":"2025-07-02T00:04:54.099Z","repository":{"id":50155530,"uuid":"371922927","full_name":"nhttp/nhttp","owner":"nhttp","description":"An Simple web-framework for Deno and Friends.","archived":false,"fork":false,"pushed_at":"2024-06-12T07:38:21.000Z","size":1220,"stargazers_count":91,"open_issues_count":5,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-04T16:07:27.319Z","etag":null,"topics":["bun","cloudflare-workers","deno","http-server","nodejs"],"latest_commit_sha":null,"homepage":"https://nhttp.deno.dev","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/nhttp.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":"2021-05-29T08:41:06.000Z","updated_at":"2025-04-13T06:22:11.000Z","dependencies_parsed_at":"2024-03-02T01:44:56.667Z","dependency_job_id":"7ba3b4ea-5283-4c26-b1d6-11d277b20f84","html_url":"https://github.com/nhttp/nhttp","commit_stats":{"total_commits":165,"total_committers":2,"mean_commits":82.5,"dds":0.0060606060606061,"last_synced_commit":"ce2b9eda4b95c4e52776a0589298f552d56b687b"},"previous_names":[],"tags_count":110,"template":false,"template_full_name":null,"purl":"pkg:github/nhttp/nhttp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhttp%2Fnhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhttp%2Fnhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhttp%2Fnhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhttp%2Fnhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhttp","download_url":"https://codeload.github.com/nhttp/nhttp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhttp%2Fnhttp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263052430,"owners_count":23406105,"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","cloudflare-workers","deno","http-server","nodejs"],"created_at":"2024-08-17T08:02:25.182Z","updated_at":"2025-07-02T00:04:54.019Z","avatar_url":"https://github.com/nhttp.png","language":"TypeScript","funding_links":[],"categories":["nodejs"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/nhttp/nhttp\"\u003e\u003cimg height=\"200\" style=\"height: 200px\" src=\"https://raw.githubusercontent.com/nhttp/nhttp/master/dummy/logo.png\" alt=\"logo\"\u003e\u003c/a\u003e\n  \u003ch1 align=\"center\"\u003eNHttp\u003c/h1\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\nAn Simple web-framework for \u003ca href=\"https://deno.land/\"\u003eDeno\u003c/a\u003e and Friends.\n\u003c/p\u003e\n\u003chr/\u003e\n\n[![CI](https://github.com/nhttp/nhttp/workflows/ci/badge.svg)](https://github.com/nhttp/nhttp)\n[![JSR](https://jsr.io/badges/@nhttp/nhttp)](https://jsr.io/@nhttp/nhttp)\n[![JSR_SCORE](https://jsr.io/badges/@nhttp/nhttp/score)](https://jsr.io/@nhttp/nhttp/score)\n[![CODECOV](https://codecov.io/gh/nhttp/nhttp/branch/master/graph/badge.svg?token=SJ2NZQ0ZJG)](https://codecov.io/gh/nhttp/nhttp)\n[![DENO](https://img.shields.io/endpoint?url=https%3A%2F%2Fdeno-visualizer.danopia.net%2Fshields%2Flatest-version%2Fx%2Fnhttp%2Fmod.ts)](https://deno.land/x/nhttp)\n[![MIT](https://img.shields.io/:license-mit-blue.svg)](http://badges.mit-license.org)\n[![PRS](https://img.shields.io/badge/PRs-welcome-blue.svg)](http://makeapullrequest.com)\n\n## Features\n\n- Focus on simple and easy to use.\n- Fast Performance.\n  [One of the fastest Frameworks](https://github.com/denosaurs/bench#hello-bench).\n- Cross runtime support (Deno, Node, Bun, etc).\n- Low overhead \u0026 True handlers (no caching anything).\n- Built-in Middleware.\n- Sub router support.\n- Template engine support (jsx, ejs, nunjucks, eta, pug, ..etc).\n- Return directly on handlers.\n- Auto parses the body (`json / urlencoded / multipart / raw`).\n\n[See Examples](https://github.com/nhttp/nhttp/tree/master/examples)\n\n## Installation\n\n### JSR\n\n```bash\n// Deno\ndeno add @nhttp/nhttp\n\n// npm\nnpx jsr add @nhttp/nhttp\n\n// Yarn\nyarn dlx jsr add @nhttp/nhttp\n\n// pnpm\npnpm dlx jsr add @nhttp/nhttp\n\n// Bun\nbunx jsr add @nhttp/nhttp\n```\n\n### deno.land\n\n```ts\nimport nhttp from \"https://deno.land/x/nhttp/mod.ts\";\n```\n\n## Simple Usage\n\nCreate file `app.ts` and copy-paste this code.\n\n```ts\nimport nhttp from \"@nhttp/nhttp\";\n\nconst app = nhttp();\n\napp.get(\"/\", () =\u003e {\n  return \"Hello, World\";\n});\n\napp.get(\"/cat\", () =\u003e {\n  return { name: \"cat\" };\n});\n\napp.listen(8000);\n```\n\n### Run\n\n```bash\ndeno run -A app.ts\n```\n\n## Using JSX + Htmx\n\nCreate file `app.tsx` and copy-paste this code.\n\n```jsx\nimport nhttp from \"@nhttp/nhttp\";\nimport { htmx, renderToHtml } from \"@nhttp/nhttp/jsx\";\n\nconst app = nhttp();\n\napp.engine(renderToHtml);\n\napp.use(htmx());\n\napp.get(\"/\", () =\u003e {\n  return (\n    \u003cbutton hx-post=\"/clicked\" hx-swap=\"outerHTML\"\u003e\n      Click Me\n    \u003c/button\u003e\n  );\n});\n\napp.post(\"/clicked\", () =\u003e {\n  return \u003cspan\u003eIt's Me\u003c/span\u003e;\n});\n\napp.listen(8000);\n```\n\n## config jsx\n\ndeno.json / tsconfig.json\n\n```json\n{\n  \"compilerOptions\": {\n    \"jsx\": \"react-jsx\",\n    \"jsxImportSource\": \"@nhttp/nhttp/jsx\"\n  }\n}\n```\n\nmore docs =\u003e https://nhttp.deno.dev\n\n## Standard Lib\n\nLike `std-libs` for NHttp.\n\n### Usage\n\n```ts\n// JSR\nimport {...} from \"@nhttp/nhttp/my-libs\";\n\n// deno.land\nimport {...} from \"https://deno.land/x/nhttp/lib/my-libs.ts\";\n```\n\n### Serve Static\n\n```ts\nimport nhttp from \"@nhttp/nhttp\";\nimport serveStatic from \"@nhttp/nhttp/serve-static\";\n\nconst app = nhttp();\n\napp.use(serveStatic(\"./my_folder\"));\n\n// with prefix\napp.use(serveStatic(\"./my_folder\", { prefix: \"/assets\" }));\n// or\n// app.use(\"/assets\", serveStatic(\"./my_folder\"));\n\n// with URL\napp.use(serveStatic(new URL(\"./my_folder\", import.meta.url)));\n```\n\n## CLI\n\n### Deno\n\n```bash\ndeno run -Ar npm:create-nhttp\n```\n\n### Npm\n\n```bash\nnpm create nhttp@latest\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhttp%2Fnhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhttp%2Fnhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhttp%2Fnhttp/lists"}