{"id":27456530,"url":"https://github.com/tarrowren/koa-range-static","last_synced_at":"2026-05-14T21:34:57.925Z","repository":{"id":42111127,"uuid":"509057840","full_name":"Tarrowren/koa-range-static","owner":"Tarrowren","description":"Static file server middleware, support for multipart ranges request","archived":false,"fork":false,"pushed_at":"2022-08-11T05:54:20.000Z","size":608,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-24T10:14:39.910Z","etag":null,"topics":["koa"],"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/Tarrowren.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-06-30T11:46:55.000Z","updated_at":"2023-06-08T16:40:14.000Z","dependencies_parsed_at":"2022-08-12T06:20:46.884Z","dependency_job_id":null,"html_url":"https://github.com/Tarrowren/koa-range-static","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Tarrowren/koa-range-static","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarrowren%2Fkoa-range-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarrowren%2Fkoa-range-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarrowren%2Fkoa-range-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarrowren%2Fkoa-range-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tarrowren","download_url":"https://codeload.github.com/Tarrowren/koa-range-static/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tarrowren%2Fkoa-range-static/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003726,"owners_count":26083610,"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-10-10T02:00:06.843Z","response_time":62,"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"],"created_at":"2025-04-15T18:28:43.551Z","updated_at":"2025-10-10T11:11:15.538Z","avatar_url":"https://github.com/Tarrowren.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koa-range-static\n\nStatic file server middleware, support for multipart ranges request\n\n## Install\n\n```sh\nnpm i koa-range-static\n```\n\n## Example\n\n```js\nconst Application = require(\"koa\");\nconst { rangeStatic } = require(\"koa-range-static\");\n\nconst app = new Application();\napp.use(rangeStatic({ root: \".\", directory: true }));\napp.listen(3000);\n```\n\n## API\n\n```js\n// rangeStatic\nconst { rangeStatic } = require(\"koa-range-static\");\napp.use(rangeStatic(rangeStaticOptions));\n\n// send\nconst { send } = require(\"koa-range-static\");\napp.use(async (ctx) =\u003e {\n  await send(ctx, ctx.path, sendOptions);\n});\n```\n\n- rangeStatic options\n\n  - `directory` Show directory, conflict with `format`. Default is `false`\n  - `renderDirent` Render directory entries.\n  - For others, see `send options`\n\n- send options\n  - `delay` Delay sending each chunk. Default is `0`\n  - `format` If not false, format the path to serve static file servers and not require a trailing slash for directories, so that you can do both /directory and /directory/. Default is `false`\n  - `hidden` Allow transfer of hidden files and show hidden directory. Default is `false`\n  - `immutable` Tell the browser the resource is immutable and can be cached indefinitely. Default is `false`\n  - `index` Name of the index file to serve automatically when visiting the root location. Default is `\"index.html\"`\n  - `maxage` Browser cache max-age in seconds. Default is `0`\n  - `multipart` Enable multipart ranges. Default is `true`\n  - `root` Root directory to restrict file access. Default is `resolve()`\n  - `getBoundaryParam` Boundary parameter required for multipart ranges requests. Default is a random value of length 12\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarrowren%2Fkoa-range-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarrowren%2Fkoa-range-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarrowren%2Fkoa-range-static/lists"}