1.0.4 • Published 8 years ago

reserved-number-cli v1.0.4

Weekly downloads
24
License
VOL
Repository
github
Last release
8 years ago

reserved-number-cli

Allocate and deallocate numbers.

install

npm install -g reserved-number-cli

set up

You have to pass in three properties each time you run this:

  • --minimum The smallest number allowed (inclusive).
  • --maximum The biggest number allowed (inclusive).
  • --settings The filesystem path to the JSON file storing the numbers.

The easiest way to do this is to create an alias:

alias resnum="reserved-number --minimum=4000 --maximum=6000 --settings=/path/to/settings.json"

use it

If you've set it up with the alias above, you'd use it like this:

resnum [allocate|a|get|g|deallocate|d] [name]

allocate number

Allocate an unused number out of the min/max range with the name myapp

resnum allocate myapp
resnum a myapp

The output will be the allocated number, if enough free numbers are available, or an error if not enough numbers are available.

get an allocated number

Get a previously allocated number:

resnum get myapp
resnum g myapp

The output will be the number, if one has been allocated for that name, or an error if a number has not been allocated for that name.

deallocate number

Deallocate a previously allocated number:

resnum deallocate myapp
resnum d myapp

The output is always blank.

license

VOL

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago