Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

listen-port

1.0.1 • Public • Published

listen-port

Retrieve the port(s) that a process is listening on. Executes lsof behind the scenes.

usage

import port from 'listen-port'
 
port(`tor`)
  .then(ports => console.log(`tor is listening on ${ports}`))
  .catch(console.error)

api

port(query)

Returns a single value as a Number or an Array of multiple values.

query

A String containing a COMMAND or a PID as a Number.

install

npm i listen-port

Downloadsweekly downloads

10

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability