-
Notifications
You must be signed in to change notification settings - Fork 43
CLI
The treeGatewayConfig command line tool uses the Node.js SDK to allow gateway management through command line scripts.
Ensure that you have already installed the gateway and have an instance running:
$ npm install -g tree-gateway
$ treeGateway
In order to start using TreeGateway, you must create the first user. Whe can do this by using the CLI tool. Here's a sample:
$ treeGatewayConfig users add -l sampleuserlogin -p sampleuserpassword -n sampleusername -r admin config
In the previous case, we created the user named "sampleusername" with two roles: admin and config.
You can configure all the gateway functionalities using the CLI tool. To see all the available options check the program help:
$ treeGatewayConfig -h
Note that you can provide for all commands available the following option:
- -c (or --config): the gateway config file.
The program allow you to configure:
- the gateway;
- middlewares;
- apis;
- users for the REST Apis If you need help for a specific command, just type:
$ treeGatewayConfig <command> -h
Example:
$ treeGatewayConfig apis -h
This will show the list with descriptions of all operations supported by apis
command.
Another helpfull command is to reload the Gateway properties. You can do this by the following command:
$ treeGatewayConfig gateway --update ./myGateway.config.json