Skip to content

ProtocolConfig

thiagobustamante edited this page Jun 19, 2017 · 7 revisions

Configure a protocol to be used by Tree-Gateway or by the Gateway Admin API.

It supports the following properties:

Property Type Description Required
http HttpConfig Configure the HTTP protocol. false
https HttpConfigs Configure the HTTPS protocol. false

HttpConfig

Configurations for HTTP listener. It supports the following properties:

Property Type Description Required
listenPort number The listen port. true

HttpsConfig

Configurations for HTTPS listener. It supports the following properties:

Property Type Description Required
listenPort number The listen port. true
privateKey string Path to the private key file. true
certificate string Path to the certificate file. true

Example:

{
    "protocol": {
        "http": {
            "listenPort": 8000
        },
        "https": {
            "listenPort": 8001,
            "privateKey": "./server.key",
            "certificate": "./server.crt"                        
        }
    }
}

or

protocol:
  http:
    listenPort: 8000
  https:
    listenPort: 8001
    privateKey: "./server.key"
    certificate: "./server.crt"
Clone this wiki locally