@ -20,7 +20,7 @@ For the examples below, we assume we're in a project directory looking like this
└── package.json
```
All paths/routes are specified using [express syntax](http://expressjs.com/guide/routing.html#route-paths).
All paths/routes are specified using [express syntax](http://expressjs.com/guide/routing.html#route-paths). To run the example projects linked below, clone the project, move into the example directory specified, run `ws`.
You're building a web app with client-side routing, so mark `index.html` as the SPA.
@ -41,6 +43,8 @@ By default, typical SPA urls (e.g. `/user/1`, `/login`) would return `404 Not Fo
*If a static file at the requested path exists (e.g. `/css/style.css`) then serve it, if it does not (e.g. `/login`) then serve the specified SPA and handle the route client-side.*
Instructions for how to visualise log output using goaccess, logstalgia or gltail [here](https://github.com/75lb/local-web-server/blob/master/doc/visualisation.md).
@ -210,6 +220,11 @@ serving at http://localhost:8100
- [.forbid] <code>Array.<string></code> - A list of forbidden routes, each route being an [express route-path](http://expressjs.com/guide/routing.html#route-paths).
- [.spa] <code>string</code> - specify an SPA file to catch requests for everything but static assets.
@ -20,7 +20,7 @@ For the examples below, we assume we're in a project directory looking like this
└── package.json
```
All paths/routes are specified using [express syntax](http://expressjs.com/guide/routing.html#route-paths).
All paths/routes are specified using [express syntax](http://expressjs.com/guide/routing.html#route-paths). To run the example projects linked below, clone the project, move into the example directory specified, run `ws`.
You're building a web app with client-side routing, so mark `index.html` as the SPA.
@ -41,6 +43,8 @@ By default, typical SPA urls (e.g. `/user/1`, `/login`) would return `404 Not Fo
*If a static file at the requested path exists (e.g. `/css/style.css`) then serve it, if it does not (e.g. `/login`) then serve the specified SPA and handle the route client-side.*
Instructions for how to visualise log output using goaccess, logstalgia or gltail [here](https://github.com/75lb/local-web-server/blob/master/doc/visualisation.md).