⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
/**
* Kaneo API base URL without trailing slash and without `/api` suffix.
*/
export function normalizeBaseUrl(raw: string): string {
const trimmed = raw.trim().replace(/\/+$/, "");
try {
const u = new URL(trimmed);
let path = u.pathname.replace(/\/+$/, "");
if (path === "/api" || path.endsWith("/api")) {
path = path.replace(/\/?api$/, "") || "/";
u.pathname = path;
}
return `${u.protocol}//${u.host}${path === "/" ? "" : path}`;
} catch {
return trimmed.replace(/\/api\/?$/, "").replace(/\/+$/, "");
}
}