File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88VITE_RUNTIME_MODE = msw
99
1010# ObjectStack Server URL (used when VITE_RUNTIME_MODE=server)
11- # VITE_SERVER_URL=http://localhost:5000/api/v1
11+ # Note: This should be the server root URL, not including /api/v1
12+ # The client adds /api/v1/... internally
13+ # VITE_SERVER_URL=http://localhost:5000
Original file line number Diff line number Diff line change @@ -18,13 +18,15 @@ export interface ConsoleConfig {
1818
1919 /**
2020 * Server base URL (used in 'server' mode)
21- * @default 'http://localhost:5000/api/v1'
21+ * This should be the server root, not including /api/v1
22+ * @default 'http://localhost:5000'
2223 */
2324 serverUrl : string ;
2425
2526 /**
2627 * MSW API base path (used in 'msw' mode)
27- * @default '/api/v1'
28+ * This should be empty string since client adds /api/v1/... internally
29+ * @default ''
2830 */
2931 mswBasePath : string ;
3032}
@@ -48,8 +50,8 @@ function getRuntimeMode(): RuntimeMode {
4850 */
4951const defaultConfig : ConsoleConfig = {
5052 mode : getRuntimeMode ( ) ,
51- serverUrl : import . meta. env . VITE_SERVER_URL || 'http://localhost:5000/api/v1 ' ,
52- mswBasePath : '/ api/v1' ,
53+ serverUrl : import . meta. env . VITE_SERVER_URL || 'http://localhost:5000' ,
54+ mswBasePath : '' , // Empty - client adds / api/v1/... internally
5355} ;
5456
5557/**
You can’t perform that action at this time.
0 commit comments