https://github.com/john-doherty/is-port-free
A simple node module to check if a TCP port is free on the local machine.
https://github.com/john-doherty/is-port-free
node-module nodejs tcp-port
Last synced: about 1 month ago
JSON representation
A simple node module to check if a TCP port is free on the local machine.
- Host: GitHub
- URL: https://github.com/john-doherty/is-port-free
- Owner: john-doherty
- License: isc
- Created: 2016-09-30T20:45:53.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-13T23:18:31.000Z (about 7 years ago)
- Last Synced: 2025-04-21T12:58:10.161Z (about 1 month ago)
- Topics: node-module, nodejs, tcp-port
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# is-port-free
[](https://app.shippable.com/projects/5818b23b8ec3a610001a7293) [](https://www.npmjs.com/package/is-port-free) [](https://www.linkedin.com/in/john-i-doherty) [](https://twitter.com/mrJohnDoherty)
A simple node module to check if a TCP port is free on the local machine. See also [is-port-busy](https://www.npmjs.com/package/is-port-busy)
## Installation
```bash
$ npm install --save is-port-free
```## Example
```js
var isPortFree = require('is-port-free');isPortFree(8080).then(function(){
console.log('yes');
})
.catch(function(){
console.log('no');
});
```## Running tests
Install dev dependencies and run tests:
```
$ npm install -d && npm test
```## License
Licensed under [ISC License](LICENSE) © [John Doherty](http://www.johndoherty.info)