From 394b4f0bf7f2a4d496ffe69c8e30cff153d69532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 14 Jan 2016 20:00:50 +0100 Subject: Simplify example instructions and fix broken examples Also convert to AsciiDoc while we're at it. --- examples/static_world/README.asciidoc | 30 +++++++++++++++++++++++++++ examples/static_world/README.md | 38 ----------------------------------- 2 files changed, 30 insertions(+), 38 deletions(-) create mode 100644 examples/static_world/README.asciidoc delete mode 100644 examples/static_world/README.md (limited to 'examples/static_world') diff --git a/examples/static_world/README.asciidoc b/examples/static_world/README.asciidoc new file mode 100644 index 0000000..3f09900 --- /dev/null +++ b/examples/static_world/README.asciidoc @@ -0,0 +1,30 @@ += Static file handler example + +To try this example, you need GNU `make` and `git` in your PATH. + +To build and run the example, use the following command: + +[source,bash] +$ make run + +The example will serve all the files found in the 'priv/' +directory. For example: + +* http://localhost:8080/test.txt[Plain text file] +* http://localhost:8080/video.html[HTML5 video demo] + +== Example output + +[source,bash] +---- +$ curl -i http://localhost:8080/test.txt +HTTP/1.1 200 OK +connection: keep-alive +server: Cowboy +date: Mon, 09 Sep 2013 13:49:50 GMT +content-length: 52 +content-type: text/plain +last-modified: Fri, 18 Jan 2013 16:33:31 GMT + +If you read this then the static file server works! +---- diff --git a/examples/static_world/README.md b/examples/static_world/README.md deleted file mode 100644 index aa72e89..0000000 --- a/examples/static_world/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Static file handler example -=========================== - -To try this example, you need GNU `make` and `git` in your PATH. - -To build the example, run the following command: - -``` bash -$ make -``` - -To start the release in the foreground: - -``` bash -$ ./_rel/static_world_example/bin/static_world_example console -``` - -The example will serve all the files found in the `priv` -directory. For example: - - * [Plain text file](http://localhost:8080/test.txt) - * [HTML5 video demo](http://localhost:8080/video.html) - -Example output --------------- - -``` bash -$ curl -i http://localhost:8080/test.txt -HTTP/1.1 200 OK -connection: keep-alive -server: Cowboy -date: Mon, 09 Sep 2013 13:49:50 GMT -content-length: 52 -content-type: text/plain -last-modified: Fri, 18 Jan 2013 16:33:31 GMT - -If you read this then the static file server works! -``` -- cgit v1.2.3