JSPM

localhost-port-check

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q12666F
  • License ISC

CLI tool to check listening localhost ports on macOS

Package Exports

  • localhost-port-check
  • localhost-port-check/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (localhost-port-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

localhost-checker

CLI tool to check listening localhost ports on macOS.

Installation

npm install
npm link  # optional: install globally as 'lh' command

Usage

# Run directly
node index.js

# Or with npm
npm start

# If globally installed
lh

Output

Displays a table of all listening ports with:

  • Port: Port number (red for < 1024, green otherwise)
  • Address: Bind address (127.0.0.1 = local only, * = all interfaces)
  • PID: Process ID
  • Command: Process name
  • User: Running user

Example

🔍 Localhost Listening Ports

┌───────┬───────────┬───────┬───────────┬───────┐
│ Port  │ Address   │ PID   │ Command   │ User  │
├───────┼───────────┼───────┼───────────┼───────┤
│ 3000  │ 127.0.0.1 │ 12345 │ node      │ user  │
├───────┼───────────┼───────┼───────────┼───────┤
│ 3306  │ 127.0.0.1 │ 3946  │ mysqld    │ user  │
└───────┴───────────┴───────┴───────────┴───────┘

  Total: 2 port(s) listening

License

ISC