Commit 7540bc52 authored by Arunoda Susiripala's avatar Arunoda Susiripala

Update info about rules.

parent a00105a3
...@@ -25,22 +25,18 @@ Now you can visit http://localhost:9000 and access and develop both apps a singl ...@@ -25,22 +25,18 @@ Now you can visit http://localhost:9000 and access and develop both apps a singl
### Proxy Rules ### Proxy Rules
This is the place we define rules for our proxy. Here are the rules for this app: This is the place we define rules for our proxy. Here are the rules(in `rules.json`) available for this app:
```json ```json
[ {
{ "rules": [
"pathname": "/blog(/**)", {"pathname": "/blog", "method":["GET", "POST", "OPTIONS"], "dest": "http://localhost:5000"},
"zone": { "name": "blog", "url": "http://localhost:5000" } {"pathname": "/**", "dest": "http://localhost:4000"}
}, ]
{ }
"pathname": "/**",
"zone": { "name": "home", "url": "http://localhost:4000" }
}
]
``` ```
This is the place where how define different zones and how they should proxy. The name of the proxy is important and it'll be used in the client side. These rules are based on ZEIT now [path alias](https://zeit.co/docs/features/path-aliases) rules and use [`micro-proxy`](https://github.com/zeit/micro-proxy) as the proxy.
## Special Notes ## Special Notes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment