mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-03-11 13:23:06 +01:00
update ports
This commit is contained in:
parent
7ac70d6fc0
commit
5f27c97dbe
@ -13,6 +13,9 @@ import {v4 as uuidv4} from "uuid";
|
|||||||
const PromptAppPathVarName = "PROMPT_APP_PATH";
|
const PromptAppPathVarName = "PROMPT_APP_PATH";
|
||||||
const PromptDevVarName = "PROMPT_DEV";
|
const PromptDevVarName = "PROMPT_DEV";
|
||||||
const AuthKeyFile = "prompt.authkey";
|
const AuthKeyFile = "prompt.authkey";
|
||||||
|
const DevServerEndpoint = "http://localhost:8090";
|
||||||
|
const ProdServerEndpoint = "http://localhost:1619";
|
||||||
|
|
||||||
let isDev = (process.env[PromptDevVarName] != null);
|
let isDev = (process.env[PromptDevVarName] != null);
|
||||||
let scHome = getPromptHomeDir();
|
let scHome = getPromptHomeDir();
|
||||||
ensureDir(scHome);
|
ensureDir(scHome);
|
||||||
@ -89,9 +92,9 @@ function getAppBasePath() {
|
|||||||
|
|
||||||
function getBaseHostPort() {
|
function getBaseHostPort() {
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
return "http://localhost:8090";
|
return DevServerEndpoint;
|
||||||
}
|
}
|
||||||
return "http://localhost:8080";
|
return ProdServerEndpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLocalServerPath() {
|
function getLocalServerPath() {
|
||||||
|
@ -173,7 +173,7 @@ class LineText extends React.Component<{sw : ScreenWindow, line : LineType}, {}>
|
|||||||
return (
|
return (
|
||||||
<div className="line line-text" data-lineid={line.lineid} data-linenum={line.linenum} data-windowid={line.windowid} onClick={this.clickHandler}>
|
<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})}/>
|
<div className={cn("focus-indicator", {"selected": isSelected}, {"active": isSelected && isFocused})}/>
|
||||||
<LineAvatar line={line}/>
|
<LineAvatar line={line} cmd={null}/>
|
||||||
<div className="line-content">
|
<div className="line-content">
|
||||||
<div className="meta">
|
<div className="meta">
|
||||||
<div className="ts">{formattedTime}</div>
|
<div className="ts">{formattedTime}</div>
|
||||||
|
13
src/model.ts
13
src/model.ts
@ -15,6 +15,11 @@ const RemotePtyRows = 8; // also in main.tsx
|
|||||||
const RemotePtyCols = 80;
|
const RemotePtyCols = 80;
|
||||||
const MinTermCols = 10;
|
const MinTermCols = 10;
|
||||||
const MaxTermCols = 1024;
|
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 = {
|
type SWLinePtr = {
|
||||||
line : LineType,
|
line : LineType,
|
||||||
@ -1582,16 +1587,16 @@ class Model {
|
|||||||
|
|
||||||
getBaseHostPort() : string {
|
getBaseHostPort() : string {
|
||||||
if (this.isDev) {
|
if (this.isDev) {
|
||||||
return "http://localhost:8090";
|
return DevServerEndpoint;
|
||||||
}
|
}
|
||||||
return "http://localhost:8080";
|
return ProdServerEndpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
getBaseWsHostPort() : string {
|
getBaseWsHostPort() : string {
|
||||||
if (this.isDev) {
|
if (this.isDev) {
|
||||||
return "ws://localhost:8091";
|
return DevServerWsEndpoint;
|
||||||
}
|
}
|
||||||
return "ws://localhost:8081";
|
return ProdServerWsEndpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
getFetchHeaders() : Record<string, string> {
|
getFetchHeaders() : Record<string, string> {
|
||||||
|
Loading…
Reference in New Issue
Block a user