diff --git a/src/emain.ts b/src/emain.ts index 7d11e9145..a5d090e71 100644 --- a/src/emain.ts +++ b/src/emain.ts @@ -13,6 +13,9 @@ import {v4 as uuidv4} from "uuid"; const PromptAppPathVarName = "PROMPT_APP_PATH"; const PromptDevVarName = "PROMPT_DEV"; const AuthKeyFile = "prompt.authkey"; +const DevServerEndpoint = "http://localhost:8090"; +const ProdServerEndpoint = "http://localhost:1619"; + let isDev = (process.env[PromptDevVarName] != null); let scHome = getPromptHomeDir(); ensureDir(scHome); @@ -89,9 +92,9 @@ function getAppBasePath() { function getBaseHostPort() { if (isDev) { - return "http://localhost:8090"; + return DevServerEndpoint; } - return "http://localhost:8080"; + return ProdServerEndpoint; } function getLocalServerPath() { diff --git a/src/main.tsx b/src/main.tsx index 19879a6e3..74e578577 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -173,7 +173,7 @@ class LineText extends React.Component<{sw : ScreenWindow, line : LineType}, {}> return (
- +
{formattedTime}
diff --git a/src/model.ts b/src/model.ts index 7842d9d19..383f1fa90 100644 --- a/src/model.ts +++ b/src/model.ts @@ -15,6 +15,11 @@ const RemotePtyRows = 8; // also in main.tsx const RemotePtyCols = 80; const MinTermCols = 10; const MaxTermCols = 1024; +const ProdServerEndpoint = "http://localhost:1619"; +const ProdServerWsEndpoint = "ws://localhost:1623"; +const DevServerEndpoint = "http://localhost:8090"; +const DevServerWsEndpoint = "ws://localhost:8091"; + type SWLinePtr = { line : LineType, @@ -1582,16 +1587,16 @@ class Model { getBaseHostPort() : string { if (this.isDev) { - return "http://localhost:8090"; + return DevServerEndpoint; } - return "http://localhost:8080"; + return ProdServerEndpoint; } getBaseWsHostPort() : string { if (this.isDev) { - return "ws://localhost:8091"; + return DevServerWsEndpoint; } - return "ws://localhost:8081"; + return ProdServerWsEndpoint; } getFetchHeaders() : Record {