https://github.com/kessler/find-port
finds an open port
https://github.com/kessler/find-port
Last synced: about 1 year ago
JSON representation
finds an open port
- Host: GitHub
- URL: https://github.com/kessler/find-port
- Owner: kessler
- License: mit
- Created: 2014-01-18T07:10:20.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-05-13T18:01:21.000Z (about 4 years ago)
- Last Synced: 2025-04-04T03:31:51.140Z (about 1 year ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 60
- Watchers: 1
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# find-port
find an unused port in your localhost
```js
var findPort = require('find-port')
// scan a range
findPort('127.0.0.1', 8000, 8003, function(ports) {
console.log(ports)
})
// scan explicitly
findPort('127.0.0.1', [8000, 8011], function(ports) {
console.log(ports)
})
```
- Since version 2.0.0 a local interface must be specified
- This module is not designed to scan remote ports only local ones.