readme
This commit is contained in:
15
README.md
15
README.md
@ -14,9 +14,20 @@ Usage
|
|||||||
-----
|
-----
|
||||||
From the folder you wish to serve, run:
|
From the folder you wish to serve, run:
|
||||||
```sh
|
```sh
|
||||||
$ ws [--port|-p <port>] [--log-format|-f dev|default|short|tiny]
|
$ ws
|
||||||
|
serving at http://localhost:8000
|
||||||
|
```
|
||||||
|
|
||||||
|
If you wish to override the default port (8000), use `--port` or `-p`:
|
||||||
|
```sh
|
||||||
|
$ ws --port 9000
|
||||||
|
serving at http://localhost:9000
|
||||||
|
```
|
||||||
|
|
||||||
|
Use a built-in or custom [Connect logger format](http://www.senchalabs.org/connect/middleware-logger.html) with `--log-format`:
|
||||||
|
```sh
|
||||||
|
$ ws --log-format short
|
||||||
```
|
```
|
||||||
The default port and log-format are 8000 and "dev", respectively.
|
|
||||||
|
|
||||||
Use with Logstalgia
|
Use with Logstalgia
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -34,5 +34,5 @@ if (!options.valid){
|
|||||||
.use(connect.directory(process.cwd()))
|
.use(connect.directory(process.cwd()))
|
||||||
.listen(options.port);
|
.listen(options.port);
|
||||||
|
|
||||||
process.stderr.write("listening on port " + options.port + "\n");
|
process.stderr.write("listening at http://localhost:" + options.port + "\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user