Browse Source

readme

master
Lloyd Brookes 11 years ago
parent
commit
bea8a1c238
  1. 15
      README.md
  2. 2
      server.js

15
README.md

@ -14,9 +14,20 @@ Usage
-----
From the folder you wish to serve, run:
```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
-------------------

2
server.js

@ -34,5 +34,5 @@ if (!options.valid){
.use(connect.directory(process.cwd()))
.listen(options.port);
process.stderr.write("listening on port " + options.port + "\n");
process.stderr.write("listening at http://localhost:" + options.port + "\n");
}
Loading…
Cancel
Save