{"id":14996116,"url":"https://github.com/lmzdev/koa-echo","last_synced_at":"2026-02-09T23:31:49.871Z","repository":{"id":89728317,"uuid":"607314405","full_name":"lmzdev/koa-echo","owner":"lmzdev","description":"Koa Middleware for debugging and mockup purposes","archived":false,"fork":false,"pushed_at":"2023-03-03T08:38:22.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T23:49:42.236Z","etag":null,"topics":["koa","nodejs","npm","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/koa-echo","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/lmzdev.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-02-27T18:39:19.000Z","updated_at":"2023-03-03T08:43:20.000Z","dependencies_parsed_at":"2023-05-25T02:45:37.734Z","dependency_job_id":null,"html_url":"https://github.com/lmzdev/koa-echo","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.3076923076923077,"last_synced_commit":"1eb66017cffe25757c4a463c45d820b55c543b6e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lmzdev/koa-echo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmzdev%2Fkoa-echo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmzdev%2Fkoa-echo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmzdev%2Fkoa-echo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmzdev%2Fkoa-echo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmzdev","download_url":"https://codeload.github.com/lmzdev/koa-echo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmzdev%2Fkoa-echo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270387578,"owners_count":24575026,"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-08-14T02:00:10.309Z","response_time":75,"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":["koa","nodejs","npm","npm-package","typescript"],"created_at":"2024-09-24T16:32:42.304Z","updated_at":"2026-02-09T23:31:49.831Z","avatar_url":"https://github.com/lmzdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-echo\n[![Node.js Build](https://github.com/lmzdev/koa-echo/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/lmzdev/koa-echo/actions/workflows/node.js.yml)\n\nKoa Middleware for debugging and mockup purposes.\nMirrors the ```ctx``` Object as response body, including ```ctx.params``` (when used with [@koa/router](https://www.npmjs.com/package/koa-router)), ```ctx.query``` and ```ctx.request.body``` and adds a ```X-Response-Time```-Header.\n\n## Installation\n```sh\nnpm install koa-echo\n```\n\n## Usage\n\n```js\nimport Koa from 'koa'\nimport { echo } from 'koa-echo'\n\nconst app = new Koa()\nconst port = 3333\n\napp\n.use(echo())\n.use((ctx) =\u003e ctx.status = 204)\n.listen(port, () =\u003e console.log(`Listening on :${port}`))\n\n```\n\n## Example Request\n```sh\ncurl --head \"localhost:3333\" \u0026\u0026 curl -s \"localhost:3333\" | jq\n```\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\nServer: node/v18.13.0\nX-Response-Time: 0.13ms\nContent-Length: 184\nConnection: keep-alive\nKeep-Alive: timeout=5\n```\n\n```json\n{\n  \"ctx\": {\n    \"request\": {\n      \"method\": \"GET\",\n      \"url\": \"/\",\n      \"header\": {\n        \"host\": \"localhost:3333\",\n        \"user-agent\": \"curl/7.79.1\",\n        \"accept\": \"*/*\"\n      }\n    },\n    \"query\": {},\n    \"response\": {\n      \"status\": 204,\n      \"message\": \"No Content\"\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmzdev%2Fkoa-echo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmzdev%2Fkoa-echo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmzdev%2Fkoa-echo/lists"}