mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-21 14:42:20 +03:00
Merge PR #140: refactor split ports (npmSteven) with polish fixes
Adds split-port runtime support: API and dashboard can run on separate ports. - PORT remains canonical/base - API_PORT optionally overrides API listener - DASHBOARD_PORT optionally overrides dashboard listener - API bridge server proxies OpenAI-compatible routes with 30s timeout - Centralized port resolution in src/lib/runtime/ports.ts - Unit tests for runtime port resolution (14 tests) - Healthcheck extracted into scripts/healthcheck.mjs
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { getConsistentMachineId } from "@/shared/utils/machineId";
|
||||
import { isCloudEnabled } from "@/lib/localDb";
|
||||
import { getRuntimePorts } from "@/lib/runtime/ports";
|
||||
|
||||
const { dashboardPort } = getRuntimePorts();
|
||||
|
||||
const INTERNAL_BASE_URL =
|
||||
process.env.BASE_URL ||
|
||||
process.env.NEXT_PUBLIC_BASE_URL ||
|
||||
process.env.NEXT_PUBLIC_APP_URL ||
|
||||
"http://localhost:20128";
|
||||
`http://localhost:${dashboardPort}`;
|
||||
|
||||
/**
|
||||
* Cloud sync scheduler
|
||||
|
||||
Reference in New Issue
Block a user