Skip to content

Files

Latest commit

43cc1ec · Jan 21, 2020

History

History
32 lines (24 loc) · 761 Bytes

routing.md

File metadata and controls

32 lines (24 loc) · 761 Bytes

Routing

Developers can specifies the routing configuration of the app. The routing behavior is based on simple rules:

  • The request path is matched against configured path prefix.
  • The longest matched prefix would be used.
  • Path with /_prefix is reserved for Skygear built-in APIs.

For example, in the following configuration:

deployments:
  - name: backend
    path: /api
    port: 8080
    # ...
  - name: frontend
    path: /
    port: 8080
    # ...

Requests would be routed to:

  • /: micro-service frontend
  • /api: micro-service backend
  • /login: micro-service frontend
  • /api/blogs: micro-service backend
  • /_auth/login: Skygear Auth APIs

Requests with unmatched paths would be responded with status code 404.