{"id":17777172,"url":"https://github.com/lullaby6/elysia-file-routing","last_synced_at":"2026-04-29T15:38:39.222Z","repository":{"id":259495671,"uuid":"878144721","full_name":"lullaby6/elysia-file-routing","owner":"lullaby6","description":"Bun Package - File router for Elysia.js","archived":false,"fork":false,"pushed_at":"2024-10-24T21:41:26.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T05:27:44.614Z","etag":null,"topics":["bun","elysia","elysiajs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/elysia-file-routing","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lullaby6.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-24T21:06:02.000Z","updated_at":"2024-11-16T07:46:02.000Z","dependencies_parsed_at":"2024-10-26T08:57:58.440Z","dependency_job_id":null,"html_url":"https://github.com/lullaby6/elysia-file-routing","commit_stats":null,"previous_names":["lullaby6/elysia-file-router"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lullaby6/elysia-file-routing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lullaby6%2Felysia-file-routing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lullaby6%2Felysia-file-routing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lullaby6%2Felysia-file-routing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lullaby6%2Felysia-file-routing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lullaby6","download_url":"https://codeload.github.com/lullaby6/elysia-file-routing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lullaby6%2Felysia-file-routing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269699205,"owners_count":24461209,"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-10T02:00:08.965Z","response_time":71,"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":["bun","elysia","elysiajs"],"created_at":"2024-10-26T23:05:23.337Z","updated_at":"2026-04-29T15:38:39.151Z","avatar_url":"https://github.com/lullaby6.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elysia-file-router\n\nFile router for Elysia.js inspired by Next.js, Remix, Astro...\n\n## Install\n\n```bash\nbun install elysia-file-routing\n```\n\n## Usage\n\nImport and use the plugin ```fileRouter``` in the Elysia app.\n\nBy default the value for ```fileRouter``` is ```\"./routes/\"```.\n\n```js\n// src/index.ts\nimport { Elysia } from \"elysia\";\nimport fileRouter from 'elysia-file-router'\nimport path from \"path\";\n\nconst app = new Elysia()\n  .use(fileRouter(path.join(__dirname, 'routes')))\n  .listen(3000);\n```\n\nA simple ```GET``` route:\n\n```js\n// src/routes/get.ts\nexport default function () {\n    return {\n        hello: 'World'\n    }\n}\n```\n\nUsing params (path value):\n\n```js\n// src/routes/user/[id]/get.ts\nexport default function ({params: { id }}) {\n    return {\n        user_id: id\n    }\n}\n```\n\nThe file name specifies the request method\n\nfor example a simple ```POST``` endpoint:\n\n```js\n// src/routes/user/post.ts\nexport default function () {\n    return {\n        message: \"Creating User\"\n    }\n}\n```\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flullaby6%2Felysia-file-routing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flullaby6%2Felysia-file-routing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flullaby6%2Felysia-file-routing/lists"}