chore: fix hono cleint port resolution

This commit is contained in:
d-kimsuon
2025-08-31 17:17:41 +09:00
parent cb6f78f9d5
commit 66c876478e
3 changed files with 6 additions and 4 deletions

View File

@@ -1,4 +1,8 @@
import { hc } from "hono/client";
import type { RouteType } from "../../server/hono/route";
export const honoClient = hc<RouteType>("http://localhost:3400");
export const honoClient = hc<RouteType>(
typeof window === "undefined"
? `http://localhost:${process.env["PORT"] ?? 3000}/`
: "/"
);