Skip to content
Samuel Cardoso edited this page Oct 22, 2017 · 16 revisions

The command line tool uses the Node.js SDK to allow gateway management through command line scripts.

First of all, 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 also 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
Clone this wiki locally