mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
+2
-2
@@ -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
|
||||
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user