Documentation

Configuration

gateway.config.yml

serviceEndpoints

Description

Express Gateway receives API requests on apiEndpoints, processes them, and then proxies them to downstream microservices. The serviceEndpoints section specifies the URLs of these proxied microservices.

Usage


serviceEndpoints:             # downstream microservices
  cats:                       # name, used as a reference in pipeline
    url: "http://cats1.example.com"
  dogs:                       # name, used as a reference in pipeline
    urls:                     # multiple urls can be used with load balancing
      - "http://dogs1.example.com"
      - "http://dogs2.example.com"

Options

Name Description
url the protocol and hostname to proxy requests to
urls an array of URLs, used with load balancing
proxyOptions options to be used when calling the proxy policy with this service endpoint

Description

A serviceEndpoint must have either a url property with a single string or a urls property with an array of strings.