update ports

This commit is contained in:
sawka 2023-01-30 11:35:39 -08:00
parent 7ac70d6fc0
commit 5f27c97dbe
3 changed files with 15 additions and 7 deletions

View File

@ -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() {

View File

@ -173,7 +173,7 @@ class LineText extends React.Component<{sw : ScreenWindow, line : LineType}, {}>
return (
<div className="line line-text" data-lineid={line.lineid} data-linenum={line.linenum} data-windowid={line.windowid} onClick={this.clickHandler}>
<div className={cn("focus-indicator", {"selected": isSelected}, {"active": isSelected && isFocused})}/>
<LineAvatar line={line}/>
<LineAvatar line={line} cmd={null}/>
<div className="line-content">
<div className="meta">
<div className="ts">{formattedTime}</div>

View File

@ -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<string, string> {