diff --git a/README.md b/README.md index c886609..b5d3f84 100644 --- a/README.md +++ b/README.md @@ -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`. + @@ -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)). + + ### URL rewriting and proxied requests Another common use case is to forward certain requests to a remote server. diff --git a/index.js b/index.js index 20cd797..7f214db 100644 --- a/index.js +++ b/index.js @@ -2,21 +2,6 @@ const Lws = require('lws') /** * @module local-web-server - * @emits module:local-web-server#verbose - * @example - * const LocalWebServer = require('local-web-server') - * const localWebServer = new LocalWebServer() - * const server = localWebServer.listen({ - * port: 8050, - * https: true, - * directory: 'src', - * spa: 'index.html', - * websocket: 'src/websocket-server.js' - * }) - * // secure, SPA server with listening websocket now ready on port 8050 - * - * // shut down the server - * server.close() */ /**