diff --git a/README.md b/README.md index 6883bcf..15eb94b 100644 --- a/README.md +++ b/README.md @@ -91,14 +91,6 @@ pnpm dev:client # http://localhost:5173 (proxies /api Open `http://localhost:5173/` for the tablet UI and `http://localhost:5173/admin.html` for the backoffice. -Running `dev:server` on a non-default `PORT`? Point `dev:client`'s proxy at it with -`WUTZ_SERVER_PORT` (same value as `PORT`): - -```sh -PORT=4000 ADMIN_PASSWORD=changeme pnpm dev:server -WUTZ_SERVER_PORT=4000 pnpm dev:client -``` - ## 📦 Production build ```sh @@ -164,6 +156,3 @@ the service user owns the database directory automatically. - `ADMIN_PASSWORD` (**required** for backoffice login) - `WUTZ_TZ` (default `Europe/Berlin`) — timezone for stats display and grouping - `WUTZ_DAY_CUTOFF_HOUR` (default `5`) — sales before this local hour count toward the previous business day -- `WUTZ_SERVER_PORT` (default `3000`, **client dev only** — not read by the server) — the port - `dev:client`'s Vite proxy targets; set it to match `dev:server`'s `PORT` when running the server - on something other than the default diff --git a/client/vite.config.ts b/client/vite.config.ts index c1e650b..f4ecd25 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -3,13 +3,6 @@ import preact from '@preact/preset-vite'; import legacy from '@vitejs/plugin-legacy'; import { resolve } from 'node:path'; -// The dev-server proxy target — same default (3000) as the server's own -// `process.env.PORT ?? 3000` in server/src/index.ts. Override with -// `WUTZ_SERVER_PORT` when running `dev:server` on a non-default port, e.g.: -// PORT=4000 pnpm dev:server -// WUTZ_SERVER_PORT=4000 pnpm dev:client -const serverTarget = `http://localhost:${process.env.WUTZ_SERVER_PORT ?? 3000}`; - export default defineConfig({ plugins: [ preact(), @@ -31,9 +24,9 @@ export default defineConfig({ server: { port: 5173, proxy: { - '/api': serverTarget, - '/admin': serverTarget, - '/healthz': serverTarget, + '/api': 'http://localhost:3000', + '/admin': 'http://localhost:3000', + '/healthz': 'http://localhost:3000', }, }, });