anyport
A command line tool to get a list of available ports
Last updated 3 years ago by alexchao .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install anyport 
SYNC missed versions from official npm registry.

Build Status Coverage Status

anyport

A command line tool to get a list of available ports.

Installation

npm i anyport

Usage


  Usage: anyport [options]

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
    --min [n]      The minimum port number, default: 8000
    --max [n]      The maximum port number, at most 65535
    --num [n]      The number of the available ports, default: 1

By default, it will print one available port.

$ anyport
8000

With the --num option, you can specify how many ports you want to get. The port numbers are delimited by comma.

$ anyport --num 10
8000,8001,8002,8003,8004,8005,8006,8007,8008,8009

Also, you can specify the range of the generated ports with the --min and --max options.

$ anyport --min 9000
9000
$ anyport --min 9000 --max 9005 --num 10
9000,9001,9002,9003,9004,9005

License

MIT.

Current Tags

  • 0.1.0                                ...           latest (3 years ago)

1 Versions

  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (3)
Dev Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |