0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-28 17:22:54 +01:00
hono/deno_dist/preset/quick.ts
Yusuke Wada 68808453d5
refactor: refactored hono-base (#1588)
* refactor: refactored `hono-base`

* denoify
2023-10-17 06:36:09 +09:00

20 lines
633 B
TypeScript

import { HonoBase } from '../hono-base.ts'
import type { HonoOptions } from '../hono-base.ts'
import { LinearRouter } from '../router/linear-router/index.ts'
import { SmartRouter } from '../router/smart-router/index.ts'
import { TrieRouter } from '../router/trie-router/index.ts'
import type { Env, Schema } from '../types.ts'
export class Hono<
E extends Env = Env,
S extends Schema = {},
BasePath extends string = '/'
> extends HonoBase<E, S, BasePath> {
constructor(options: HonoOptions<E> = {}) {
super(options)
this.router = new SmartRouter({
routers: [new LinearRouter(), new TrieRouter()],
})
}
}