Skip to content

Commit

Permalink
Enable running server in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
clannadxr committed Jan 30, 2023
1 parent d63e657 commit 221fbc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/src/main/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import path from 'path';
import { getLogPath } from './utils/loggerUtil';
import fs from 'fs-extra';
import { Platforms } from './enums';
import { toNumber } from 'lodash';

export let serverProcess: ChildProcess;
export let port: number;
Expand All @@ -19,6 +20,10 @@ async function runServer() {
port: 12283, // minimum port
stopPort: 13283, // maximum port
});
if (process.env.SERVER_PORT) {
port = toNumber(process.env.SERVER_PORT);
return;
}
const cmd =
process.platform === Platforms.Win ? `k8z.exe --port ${port}` : `./k8z --port ${port}`;
const serverPath = getServerPath();
Expand Down

0 comments on commit 221fbc3

Please sign in to comment.