Skip to content
Myr

docs(readme): update readme in `deno_dist`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by Yusuke Wada · parent 0c8d9ce · Browse files · 1 file+51 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+51 added−1 removed

  • other:+51 added−1 removed

1 file+51 added−1 removed

modified:deno_dist/README.md+51 added-1 removed
30 unmodified lines
31- **Zero-dependencies** - using only Service Worker and Web Standard API.32- **Middleware** - built-in middleware and ability to extend with your own middleware.33- **TypeScript** - first-class TypeScript support.34- **Optimized** - for Cloudflare Workers.35- **Deno** - support for Deno (Experimental).3636## Benchmark37## Benchmarks3839### Cloudflare Workers4041- Machine: Apple MacBook Pro, 32 GiB, M1 Pro42- Scripts: [benchmarks/handle-event](https://github.com/honojs/hono/tree/master/benchmarks/handle-event)4344**Hono is fastest**, compared to other routers for Cloudflare Workers.4546```plain47hono - trie-router(default) x 389,510 ops/sec ±3.16% (85 runs sampled)
4 unmodified lines
52Fastest is hono - regexp-router53✨ Done in 43.56s.54```5556### Deno5758- Machine: Apple MacBook Pro, 32 GiB, M1 Pro, Deno v1.22.059- Scripts: [benchmarks/deno](https://github.com/honojs/hono/tree/master/benchmarks/deno)60- Method: `autocannon -c 100 -d 40 -p 10 'http://127.0.0.1:8000/user/lookup/username/foo'`6162**Hono is fastest**, compared to other frameworks for Deno.6364| Framework | Version | Results |65| ----------------------------- | :-----: | ----------------------------------------: |66| **Hono - RegExpRouter** | 1.6.0 | **5118k requests in 40.02s, 865 MB read** |67| **Hono - TriRouter(default)** | 1.6.0 | **4932k requests in 40.02s, 833 MB read** |68| Faster | 5.7 | 3579k requests in 40.02s, 551 MB read |69| oak | 10.5.1 | 2385k requests in 40.02s, 403 MB read |70| opine | 2.2.0 | 1491k requests in 40.02s, 346 MB read |7172## Why so fast?7374Routers used in Hono are really smart.75
679 unmodified lines
755## Other Examples756757- Hono Examples - <https://github.com/honojs/examples>758759## Deno760761Hono also works with Deno. This feature is still experimental.762763```tsx764/** @jsx jsx */765import { serve } from 'https://deno.land/std@0.146.0/http/server.ts'766import { Hono, logger, poweredBy, basicAuth, jsx } from 'https://deno.land/x/hono/mod.ts'767768const app = new Hono()769770app.use('*', logger(), poweredBy())771app.get(772 '/auth/*',773 basicAuth({774 username: 'deno',775 password: 'isacool',776 })777)778779app.get('/', (c) => {780 return c.html(<h1>Hello Deno!</h1>)781})782app.get('/auth/abc', (c) => c.text('You are authorized'))783784serve(app.fire())785```786787## Related projects788789Implementation of the original router `TrieRouter` is inspired by [goblin](https://github.com/bmf-san/goblin). `RegExpRouter` is inspired by [Router::Boom](https://github.com/tokuhirom/Router-Boom). API design is inspired by [express](https://github.com/expressjs/express) and [koa](https://github.com/koajs/koa). [itty-router](https://github.com/kwhitley/itty-router), [Sunder](https://github.com/SunderJS/sunder), and [worktop](https://github.com/lukeed/worktop) are the other routers or frameworks for Cloudflare Workers.790
29 unmodified lines