Command Line Options
To see all available command line options do: ./RocketShipIt -h
Usage of ./RocketShipIt:
-e=true: Enable API explorer at /. Default: true
-listen-addr="": Address to start server on superseding -p flag. Ex: localhost:8080 192.168.0.1:8080
-p="8080": Port to start server on. Default: 8080
-s=false: Start server mode. Default: false
-v=false: Show version
RocketShipIt also has the following environment variable config option:
RS_API_KEY
This sets the API key/password for the self-hosted HTTP server.
You can also set environment variables to default carrier credentials for the API Explorer.
Stdin Mode
If you don't specify the -s
server mode RocketShipIt will expect JSON to be passed in via stdin
:
./RocketShipIt <<< '{"my": "json"}'
{
"meta": {
"code": 500,
"error_message": "Unsupported carrier: ''"
},
"data": null
}
You can also pass in a file:
./RocketShipIt < my-request.json
Server Mode
If you run RocketShipIt in server mode ./RocketShipIt -s
RocketShipIt will host an HTTP server on port -p
which is defaulted to 8080
. You should be able to reach the API explorer by going to http://localhost:8080.
See also: Self-Hosting
Environment Variables
Replace CARRIER
with the target carrier. Ex: RS_UPS_USERNAME
- RS_CARRIER_ACCOUNT_NUMBER
- RS_CARRIER_METER_NUMBER
- RS_CARRIER_USERNAME
- RS_CARRIER_PASSWORD
- RS_CARRIER_LICENSE
- RS_CARRIER_KEY
- RS_CARRIER_PROXY_HOST
- RS_CARRIER_PROXY_PORT
- RS_CARRIER_APPLICATION_ID
- RS_CARRIER_CLIENT_ID
- RS_CARRIER_CLIENT_SECRET