UNPKG

express-port-switcher

Version:

A smart port management tool that automatically finds and forwards to available ports when preferred ports are in use

14 lines (13 loc) 497 B
import { EventEmitter } from 'events'; import { PortManagerOptions } from '../types'; export declare class PortManager extends EventEmitter { private static instance; private activePorts; private readonly defaultPort; private readonly maxPortAttempts; private constructor(); static getInstance(options?: PortManagerOptions): PortManager; allocatePort(desiredPort?: number): Promise<number | null>; releasePort(port: number): void; getActivePorts(): number[]; }