mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-10 16:12:50 +00:00
完善
This commit is contained in:
parent
af103ec25f
commit
03e92b2dca
@ -33,6 +33,7 @@ function isPortAvailableSync(port: number): boolean {
|
||||
* @returns {number} - 可用的端口
|
||||
*/
|
||||
export function availablePort(startPort: number): number {
|
||||
if (!process['pkg']) return startPort;
|
||||
let port = startPort;
|
||||
while (port <= 8010) {
|
||||
if (isPortAvailableSync(port)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user