Skip to content

Commit

Permalink
Update docs with latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
witchard committed Sep 23, 2017
1 parent 327a80f commit 99a43d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ Examples
Run this script and then point your browser at http://localhost:1234/.

Grole also has an inbuilt simple file server which will serve all the files in a directory. Just run `grole.py` or `python -m grole`.
Grole also has an inbuilt simple file server which will serve all the files in a directory. Just run `grole.py` or `python -m grole`. This supports the following command line arguments:

* `--address` - The address to listen on, empty string for any address
* `--port` - The port to listen on
* `--directory` - The directory to serve
* `--noindex` - Do not show file indexes
* `--verbose` - Use verbose logging (level=DEBUG)
* `--quiet` - Use quiet logging (level=ERROR)

Further examples can be found within the examples_ folder on github.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Getting started

By default, grole will run a simple static file server in the current directory. To use this simply execute `grole.py`, or run `python -m grole`.

To serve your own functions, you first need a :class:`Grole` object. The constructor accepts a `env` variable which is passed to your handler functions such that you can share state between them.
To serve your own functions, you first need a :class:`Grole` object. The constructor accepts a `env` variable which is passed to your handler functions such that you can share state between them. Logging is done by the python logging module, if you want logging then run `logging.basicConfig(level=logging.INFO)`.

Once you have setup handler functions for your web API, you can then launch the server with :func:`Grole.run`. This takes the host and port to serve on and does not return until interrupted.

Expand Down

0 comments on commit 99a43d2

Please sign in to comment.