lsofi
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/lsofi package

1.0.0 • Public • Published

Find processes occupying a given port

lsofi stability

npm version Travis branch AppVeyor branch

Rationale

  • lsof -i :<port> for unix, darwin and win32 alike

Installation

Grab it from npm

  • npm install --save lsofi

Usage

// given 1337 is occupied and 1338 is not
const lsofi = require('lsofi')
const occupied = await lsofi(1337)
const free = await(1338)
 
console.log(occupied, free)
// => console.log(9834, null)

See also

  • krampus - Kill processes occupying a given port

lsofi is built by marionebl and contributors. It is released unter the MIT license.

Package Sidebar

Install

npm i lsofi

Weekly Downloads

1,485

Version

1.0.0

License

MIT

Last publish

Collaborators

  • marionebl