文档
npm: https://www.npmjs.com/package/portfinder
安装
npm i portfinder
示例
var portfinder = require('portfinder'); (async ()=>{ const port = await portfinder.getPortPromise(); console.log(port); // 8000 })();
文档
npm: https://www.npmjs.com/package/portfinder
安装
npm i portfinder
示例
var portfinder = require('portfinder'); (async ()=>{ const port = await portfinder.getPortPromise(); console.log(port); // 8000 })();