Story 32: Multi-Instance Worktree Support
Add configurable port via STORYKIT_PORT env var (default 3001). Server prints machine-readable STORYKIT_PORT=<port> on startup and writes .story_kit_port file for discovery. Frontend proxy and WebSocket read VITE_STORYKIT_PORT env var instead of hardcoding port 3001. 7 new tests (4 backend, 3 frontend) all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,19 +2,22 @@ import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig(() => ({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:3001",
|
||||
timeout: 120000,
|
||||
export default defineConfig(() => {
|
||||
const backendPort = process.env.VITE_STORYKIT_PORT || "3001";
|
||||
return {
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: `http://127.0.0.1:${backendPort}`,
|
||||
timeout: 120000,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: "dist",
|
||||
emptyOutDir: true,
|
||||
},
|
||||
}));
|
||||
build: {
|
||||
outDir: "dist",
|
||||
emptyOutDir: true,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user