ko-port
make sure get an available port on your server
支持本地安装(Local Installation)
$ npm install ko-port
支持全局安装(Global Installation)
$ npm install ko-port -g
支持API
asyncPort(port: number): Promise<any>
识别指定port是否可用,否则递归加1,返回有效port
样例:
var koport = ;koport;
killPort(port: number): Promise<any>
杀死指定的port占用进程
样例:
var koport = ;koport;
如果是全局(Global)安装:
$ koport 3000