This commit is contained in:
Lloyd Brookes
2019-06-09 13:42:07 +01:00
parent 9277ad664d
commit 1f86cb7dc2

View File

@ -68,6 +68,8 @@ The following command proxies blog post requests from any path beginning with `/
$ ws --rewrite '/posts/(.*) -> https://jsonplaceholder.typicode.com/posts/$1'
```
[Rewrite tutorial](https://github.com/lwsjs/local-web-server/wiki/How-to-rewrite-URLs-to-local-or-remote-destinations).
This clip demonstrates the above plus use of `--static.extensions` to specify a default file extension and `--verbose` to monitor activity.
<img src="https://imgur.com/download/3flcbJn" width="618px" title="Proxy json requests to remote resource">