refactor: rename PORT to SERVER_PORT for clarity

This commit is contained in:
Haileyesus
2026-03-11 15:55:42 +03:00
parent f3b25bbbab
commit 468ab599be
8 changed files with 22 additions and 22 deletions

View File

@@ -31,7 +31,7 @@ const c = {
dim: (text) => `${colors.dim}${text}${colors.reset}`,
};
console.log('PORT from env:', process.env.PORT);
console.log('SERVER_PORT from env:', process.env.SERVER_PORT);
import express from 'express';
import { WebSocketServer, WebSocket } from 'ws';
@@ -2491,7 +2491,7 @@ async function getFileTree(dirPath, maxDepth = 3, currentDepth = 0, showHidden =
});
}
const PORT = process.env.PORT || 3001;
const SERVER_PORT = process.env.SERVER_PORT || 3001;
const HOST = process.env.HOST || '0.0.0.0';
const DISPLAY_HOST = getConnectableHost(HOST);
const VITE_PORT = process.env.VITE_PORT || 5173;
@@ -2511,12 +2511,12 @@ async function startServer() {
console.log('');
if (isProduction) {
console.log(`${c.info('[INFO]')} To run in production mode, go to http://${DISPLAY_HOST}:${PORT}`);
console.log(`${c.info('[INFO]')} To run in production mode, go to http://${DISPLAY_HOST}:${SERVER_PORT}`);
}
console.log(`${c.info('[INFO]')} To run in development mode with hot-module replacement, go to http://${DISPLAY_HOST}:${VITE_PORT}`);
server.listen(PORT, HOST, async () => {
server.listen(SERVER_PORT, HOST, async () => {
const appInstallPath = path.join(__dirname, '..');
console.log('');
@@ -2524,7 +2524,7 @@ async function startServer() {
console.log(` ${c.bright('Claude Code UI Server - Ready')}`);
console.log(c.dim('═'.repeat(63)));
console.log('');
console.log(`${c.info('[INFO]')} Server URL: ${c.bright('http://' + DISPLAY_HOST + ':' + PORT)}`);
console.log(`${c.info('[INFO]')} Server URL: ${c.bright('http://' + DISPLAY_HOST + ':' + SERVER_PORT)}`);
console.log(`${c.info('[INFO]')} Installed at: ${c.dim(appInstallPath)}`);
console.log(`${c.tip('[TIP]')} Run "cloudcli status" for full configuration details`);
console.log('');