|
|
@ -10,7 +10,7 @@ A simple web-server for productive front-end development. |
|
|
|
**Requires node v4.0.0 or higher**. |
|
|
|
|
|
|
|
## Synopsis |
|
|
|
For the examples below, assume we're in a project directory looking like this: |
|
|
|
For the examples below, and we assume we're in a project directory looking like this: |
|
|
|
|
|
|
|
```sh |
|
|
|
. |
|
|
@ -20,6 +20,8 @@ For the examples below, 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). |
|
|
|
|
|
|
|
### Static site |
|
|
|
|
|
|
|
Fire up your static site on the default port: |
|
|
@ -47,8 +49,6 @@ $ ws --forbid '*.json' '*.yml' |
|
|
|
serving at http://localhost:8000 |
|
|
|
``` |
|
|
|
|
|
|
|
[Path syntax](http://expressjs.com/guide/routing.html#route-paths) |
|
|
|
|
|
|
|
### URL rewriting |
|
|
|
|
|
|
|
Your application requested `/css/style.css` but it's stored at `/build/css/style.css`. To avoid a 404 you need a rewrite rule: |
|
|
@ -137,7 +137,7 @@ $ ws --compress |
|
|
|
|
|
|
|
#### Disable caching |
|
|
|
|
|
|
|
Disable etag-based caching |
|
|
|
Disable etag response headers, forcing resources to be served in full every time. |
|
|
|
```sh |
|
|
|
$ ws --no-cache |
|
|
|
``` |
|
|
|