Module

x/hono/hono.ts

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
File
import { HonoBase } from './hono-base.ts'import type { HonoOptions } from './hono-base.ts'import { RegExpRouter } from './router/reg-exp-router/index.ts'import { SmartRouter } from './router/smart-router/index.ts'import { TrieRouter } from './router/trie-router/index.ts'import type { BlankSchema, Env, Schema } from './types.ts'
export class Hono< E extends Env = Env, S extends Schema = BlankSchema, BasePath extends string = '/'> extends HonoBase<E, S, BasePath> { constructor(options: HonoOptions<E> = {}) { super(options) this.router = options.router ?? new SmartRouter({ routers: [new RegExpRouter(), new TrieRouter()], }) }}