https://github.com/yieldspace/tofu-on-hono
A file based router for hono.
https://github.com/yieldspace/tofu-on-hono
cloudflare-workers hono router typescript
Last synced: about 2 months ago
JSON representation
A file based router for hono.
- Host: GitHub
- URL: https://github.com/yieldspace/tofu-on-hono
- Owner: yieldspace
- License: mit
- Created: 2023-08-23T12:07:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-23T14:25:02.000Z (almost 3 years ago)
- Last Synced: 2025-02-06T05:29:12.824Z (over 1 year ago)
- Topics: cloudflare-workers, hono, router, typescript
- Language: TypeScript
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tofu-on-hono[WIP]
tofu-on-hono is a file based router for hono.
# Usage
It can use as vite plugin.
Route directory is `src/routes`.
```typescript
import {Handler} from "tofu-on-hono";
export default ((router) => router.get(
async ctx => {
return ctx.jsonT({
hello: "world!"
})
}
)) satisfies Handler
```
see examples.