use-port

1.0.4 • Public • Published

使用

const usePort = require('use-port');
const server = async () => {
  const port = await usePort(1234)

  console.log(port) // 如果被占用就是使用 1235,依次递增
}

Readme

Keywords

none

Package Sidebar

Install

npm i use-port

Weekly Downloads

0

Version

1.0.4

License

none

Unpacked Size

969 B

Total Files

4

Last publish

Collaborators

  • xuege2019