occupied-ports
v1.0.0
Published
description
Downloads
5
Readme
Occupied Ports 🚀
Get all used ports on your machine, with the related process information.
Installation
npm install occupied-ports
Usage
import { getPorts } from 'occupied-ports'
getPorts().then((ports) => {
console.log(ports) // [{ port: 3000, pid: 1234, process: 'node' }, ...]
})
Compatibility
| MacOS | Windows | Linux | | :----------------- | ------------- | ------------: | | :white_check_mark: | :interrobang: | :interrobang: |
Please let us know if you have tested this library on Windows or Linux, so we can update the compatibility table.
Linting
To lint the entire project, execute the following command;
npm run lint
To lint and fix the entire project, execute the following command;
npm run lint:fix
To format the entire project using prettier, execute the following command;
npm run format
Build
To build the library, execute the following command;
npm run build
Test
To run unit tests for the library, execute the following;
npm run test