Allocate and deallocate numbers.
npm install -g reserved-number-cli
You have to pass in three properties each time you run this:
--minimumThe smallest number allowed (inclusive).
--maximumThe biggest number allowed (inclusive).
--settingsThe 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"
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 an unused number out of the min/max range with the name
resnum allocate myappresnum 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 a previously allocated number:
resnum get myappresnum 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 a previously allocated number:
resnum deallocate myappresnum d myapp
The output is always blank.