build: move local development off port 3000

Run the dev API on 6262 and Vite on 6263 with strictPort; production
defaults stay on 3000. Define the dev client origin once and read the
typed appConfig instead of repeating its fallback in every gateway.
This commit is contained in:
neon
2026-09-23 18:18:51 +00:00
parent 1dd29c742f
commit 4b86ff73cf
35 changed files with 132 additions and 113 deletions
+2 -2
View File
@@ -6,9 +6,9 @@ Vue 3 SPA built with Vite and Tailwind CSS v4.
From the repo root: `pnpm dev` (starts both server and client).
Client only: `pnpm dev` (from this directory). Runs at http://localhost:5173.
Client only: `pnpm dev` (from this directory). Runs at http://localhost:6263.
The Vite dev server proxies `/api` and `/socket.io` requests to the backend at `localhost:3000`.
The Vite dev server proxies `/api` and `/socket.io` requests to the backend at `localhost:6262`.
## IDE setup
+3 -1
View File
@@ -9,7 +9,7 @@ import { VitePWA } from 'vite-plugin-pwa'
const apiAgent = new Agent({ keepAlive: true })
/** Lets a second dev client point at a throwaway API instance, so restart testing leaves the main stack alone. */
const apiTarget = process.env.BOOKORBIT_API_TARGET ?? 'http://localhost:3000'
const apiTarget = process.env.BOOKORBIT_API_TARGET ?? 'http://localhost:6262'
// https://vite.dev/config/
export default defineConfig({
@@ -141,6 +141,8 @@ export default defineConfig({
exclude: ['@embedpdf/core', '@embedpdf/core/vue'],
},
server: {
port: 6263,
strictPort: true,
host: true,
allowedHosts: true,
proxy: {