0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 10:51:01 +00:00
hono/deno_dist/preset/quick.ts

20 lines
633 B
TypeScript
Raw Normal View History

2023-05-09 13:15:10 +00:00
import { HonoBase } from '../hono-base.ts'
import type { HonoOptions } from '../hono-base.ts'
2023-05-09 13:15:10 +00:00
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'
2023-05-09 13:15:10 +00:00
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()],
})
2023-05-09 13:15:10 +00:00
}
}