Skip to content

Commit 329040e

Browse files
committedJun 8, 2019
readme
1 parent 1998b90 commit 329040e

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed
 

‎README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ Running `ws` without any arguments will host the current directory as a static w
3131

3232
```sh
3333
$ ws
34-
Serving at http://mbp.local:8000, http://127.0.0.1:8000, http://192.168.0.100:8000
34+
Listening on http://mbp.local:8000, http://127.0.0.1:8000, http://192.168.0.100:8000
3535
```
3636

37+
This clip demonstrates static hosting plus a couple of log output formats - `dev` and `stats`.
38+
3739
<img src="https://imgur.com/download/NJC3POY" width="618px" title="Static static log output">
3840

3941

@@ -51,6 +53,8 @@ With a static site, requests for typical SPA paths (e.g. `/user/1`, `/login`) wo
5153

5254
[SPA tutorial](https://github.com/lwsjs/local-web-server/wiki/How-to-serve-a-Single-Page-Application-(SPA)).
5355

56+
<img src="https://imgur.com/download/IQVmi8v" title="SPA">
57+
5458
### URL rewriting and proxied requests
5559

5660
Another common use case is to forward certain requests to a remote server.

‎index.js

-15
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@ const Lws = require('lws')
22

33
/**
44
* @module local-web-server
5-
* @emits module:local-web-server#verbose
6-
* @example
7-
* const LocalWebServer = require('local-web-server')
8-
* const localWebServer = new LocalWebServer()
9-
* const server = localWebServer.listen({
10-
* port: 8050,
11-
* https: true,
12-
* directory: 'src',
13-
* spa: 'index.html',
14-
* websocket: 'src/websocket-server.js'
15-
* })
16-
* // secure, SPA server with listening websocket now ready on port 8050
17-
*
18-
* // shut down the server
19-
* server.close()
205
*/
216

227
/**

0 commit comments

Comments
 (0)
Please sign in to comment.