Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hono/hono-base.ts>HonoBase#basePath

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
method HonoBase.prototype.basePath
import { HonoBase } from "https://deno.land/x/hono@v4.1.3/hono-base.ts";

.basePath() allows base paths to be specified.

Examples

Example 1

const api = new Hono().basePath('/api')

Type Parameters

SubPath extends string

Returns

Hono<E, S, MergePath<BasePath, SubPath>>