Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shakyshane/portscanner-plus
Get multiple available ports with optional names
https://github.com/shakyshane/portscanner-plus
Last synced: about 1 month ago
JSON representation
Get multiple available ports with optional names
- Host: GitHub
- URL: https://github.com/shakyshane/portscanner-plus
- Owner: shakyShane
- License: mit
- Created: 2014-02-17T08:31:42.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-11T16:25:04.000Z (about 9 years ago)
- Last Synced: 2024-11-09T09:41:06.629Z (about 2 months ago)
- Language: JavaScript
- Size: 206 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
#portscanner-plus [![Build Status](https://travis-ci.org/shakyShane/portscanner-plus.svg?branch=master)](https://travis-ci.org/shakyShane/portscanner-plus)
Get multiple availble ports within a range - with optional naming
##Install
```
npm install portscanner-plus --save-dev
```##Usage
```js
var portScanner = require("portscanner-plus");var names = ['controlPanel', 'socket', 'client'];
// Return named ports as object
portScanner.getPorts(3, 3000, 4000, names).then(function (ports) {
console.log(ports.controlPanel); // 3000
console.log(ports.socket); // 3001
console.log(ports.client); // 3002
});// Return an array of ports
portScanner.getPorts(2, 3000, 4000).then(function (ports) {
console.log(ports); // [3001, 3002]
});
```## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).## Release History
_(Nothing yet)_## License
Copyright (c) 2013 Shane Osbourne
Licensed under the MIT license.