Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
586 B ยท 16 lines
TypeScript
1234567891011121314151617import type { ResolvedRoute } from "../resolve-route";
/** * Builds the external-facing path for a page, accounting for routing mode. * - hostname routing: the slug is implicit in the host, so the suffix stands alone. * - pathname routing: the slug is prepended, e.g. `/acme/login`. * * Pass `suffix` as a leading-slash path segment (e.g. "/login") or "" for the page root. */export function buildExternalPath( route: Pick<ResolvedRoute, "type" | "prefix">, suffix: string,): string { if (route.type === "hostname") return suffix; return `/${route.prefix}${suffix}`;}