-
Notifications
You must be signed in to change notification settings - Fork 43
Gateway Configuration
Thiago da Rosa de Bustamante edited this page Mar 27, 2018
·
21 revisions
Lets show here how to read or change the gateway config using the CLI tool.
You can run the following command to retrieve the gateway config and save it in a file called gateway.yaml
:
treeGatewayConfig gateway --get > gateway.yaml
If you prefer JSON:
treeGatewayConfig gateway --get json > gateway.json
It will return something like:
underProxy: false
protocol:
http:
listenPort: 8000
admin:
protocol:
http:
listenPort: 8001
accessLogger:
msg: 'HTTP {{req.method}} - {{res.statusCode}} - {{req.url}} ({{res.responseTime}}ms)'
console:
timestamp: true
colorize: true
file:
timestamp: true
json: false
prettyPrint: true
outputDir: ./logs
userService:
jwtSecret: baf36534-b9db-4fc8-9aee-5574f07f19b1
apiDocs:
path: api-docs
logger:
level: info
console:
colorize: true
file:
timestamp: true
outputDir: ./logs
json: false
prettyPrint: true
accessLogger:
msg: 'HTTP {{req.method}} - {{res.statusCode}} - {{req.url}} ({{res.responseTime}}ms)'
console:
timestamp: true
colorize: true
file:
timestamp: true
json: false
prettyPrint: true
outputDir: ./logs
healthcheck: /healthcheck
You can then change anything in the gateway.yaml
file and then update the gateway with that configuration, running:
treeGatewayConfig gateway --update gateway.yaml
Now, take a look at GatewayConfig to see all supported configuration options.