0.1.1 • Published 7 years ago

find-pid v0.1.1

Weekly downloads
8
License
-
Repository
github
Last release
7 years ago

NPM version build status build status Test coverage David deps Known Vulnerabilities npm download

Cross-platform api of finding pid under specified conditions.

Install

$ npm i find-pid

Note: For some linux distributions, netstat is not available util you install net-tools, run sudo apt-get install net-tools.

Example

  const findByPort = require('find-pid').byPort;
  findByPort(7777, (err, pid) => {
    console.log(pid);
  });

API

  • byPort(port, callback)

Find pid by port.

Contribute

Now the only api is byPort, other features is not planned until i really need it. But i am very happy to accept a PR :)

License

MIT