-
Notifications
You must be signed in to change notification settings - Fork 42
Configuring Gateway
When tree-gateway starts, it uses the tree-gateway Config File to load the initial configuration needed.
When start the gateway, you can inform the location of this config file:
$ treeGateway -c ./tree-gateway.yaml
If you do not inform any file, the gateway will try to find one with the name tree-gateway.json
or tree-gateway.yaml
located in the directory where you start the gateway. If no config file exists, the gateway will start with its default configurations and will save it into the file ./tree-gateway.yaml
.
This file contains the configurations needed to connect to the redis database. All the other configurations are then loaded from this database, such as:
- the gateway itself - which kind os services are enabled / monitors / protocols and ports for the listening services / loggers etc;
- the admin users - Who can access the configuration services;
- the installed middlewares - To extend gateway features / listen and handle events etc;
- and all API configurations - The main purpose of the gateway: to route, secure and manage your APIs.
So, all of those configurations are inserted directly into the config database. If you change a configuration (regardless of which is), messages are sent to all cluster nodes to inform the new values. This happens without any need for a gateway restart. We provide 3 different ways to you manage all of those configurations:
- Use the Admins REST API;
- Use the Node JS SDK;
- Use the CLI admin.