Skip to content
Myr

feat: default path as `/`

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 ea1fd00 · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:src/hono.ts+2 added-2 removed
74 unmodified lines
75 method: string76 handler: Handler<string, E>77}7879export class Hono<E = Env, P extends string = ''> extends defineDynamicClass()<E, P, Hono<E, P>> {79export class Hono<E = Env, P extends string = '/'> extends defineDynamicClass()<E, P, Hono<E, P>> {80 readonly routerClass: { new (): Router<any> } = TrieRouter81 readonly strict: boolean = true // strict routing - default is true82 private _router: Router<Handler<string, E>>83 private _tempPath: string84 private path: string84 private path: string = '/'8586 routes: Route<E>[] = []8788 constructor(init: Partial<Pick<Hono, 'routerClass' | 'strict'>> = {}) {
141 unmodified lines