This commit is contained in:
Lloyd Brookes
2019-06-08 18:09:44 +01:00
parent 1998b9084a
commit 329040e94c
2 changed files with 5 additions and 16 deletions

View File

@ -31,9 +31,11 @@ Running `ws` without any arguments will host the current directory as a static w
```sh
$ ws
Serving at http://mbp.local:8000, http://127.0.0.1:8000, http://192.168.0.100:8000
Listening on http://mbp.local:8000, http://127.0.0.1:8000, http://192.168.0.100:8000
```
This clip demonstrates static hosting plus a couple of log output formats - `dev` and `stats`.
<img src="https://imgur.com/download/NJC3POY" width="618px" title="Static static log output">
@ -51,6 +53,8 @@ With a static site, requests for typical SPA paths (e.g. `/user/1`, `/login`) wo
[SPA tutorial](https://github.com/lwsjs/local-web-server/wiki/How-to-serve-a-Single-Page-Application-(SPA)).
<img src="https://imgur.com/download/IQVmi8v" title="SPA">
### URL rewriting and proxied requests
Another common use case is to forward certain requests to a remote server.