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:
1
deployments:
2
- name: backend
3
path: /api
4
port: 8080
5
# ...
6
- name: frontend
7
path: /
8
port: 8080
9
# ...
Copied!
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.
Last modified 1yr ago
Copy link