diff --git a/apps/client/src/common/api/apiConstants.ts b/apps/client/src/common/api/apiConstants.ts index 0e9028703..d8934acda 100644 --- a/apps/client/src/common/api/apiConstants.ts +++ b/apps/client/src/common/api/apiConstants.ts @@ -19,10 +19,10 @@ export const githubURL = 'https://api.github.com/repos/cpvalente/ontime/releases * @description finds server path given the current location, it * @return {*} */ -export const calculateServer = () => (import.meta.env.DEV ? `http://localhost:${STATIC_PORT}` : window.location.origin); +export const calculateServer = () => (import.meta.env.DEV ? `http://localhost:${window.location.port}` : window.location.origin); export const serverURL = calculateServer(); -export const websocketUrl = `ws://${window.location.hostname}:${STATIC_PORT}/ws`; +export const websocketUrl = `ws://${window.location.hostname}:${window.location.port}/ws`; export const eventURL = `${serverURL}/eventdata`; export const rundownURL = `${serverURL}/events`; diff --git a/apps/server/package.json b/apps/server/package.json index 6fed58942..8dd6121da 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -48,6 +48,7 @@ "dev:test": "cross-env IS_TEST=true nodemon --exec \"ts-node-esm\" ./src/index.ts", "prebuild": "pnpm setdb", "build": "pnpm prebuild && esbuild src/app.ts --log-level=error --platform=node --format=cjs --bundle --minify --outfile=dist/index.cjs", + "build:local": "pnpm prebuild && esbuild src/index.ts --log-level=error --platform=node --format=cjs --minify --bundle --outfile=dist/docker.cjs", "build:docker": "pnpm prebuild && esbuild src/index.ts --log-level=error --platform=node --format=cjs --minify --bundle --outfile=dist/docker.cjs", "build:debug": "pnpm prebuild && esbuild src/app.ts --platform=node --format=cjs --bundle --outfile=dist/index.cjs", "lint": "eslint .",