README.asciidoc 684 B

123456789101112131415161718192021222324252627282930
  1. = Static file handler example
  2. To try this example, you need GNU `make` and `git` in your PATH.
  3. To build and run the example, use the following command:
  4. [source,bash]
  5. $ make run
  6. The example will serve all the files found in the 'priv/'
  7. directory. For example:
  8. * http://localhost:8080/test.txt[Plain text file]
  9. * http://localhost:8080/video.html[HTML5 video demo]
  10. == Example output
  11. [source,bash]
  12. ----
  13. $ curl -i http://localhost:8080/test.txt
  14. HTTP/1.1 200 OK
  15. connection: keep-alive
  16. server: Cowboy
  17. date: Mon, 09 Sep 2013 13:49:50 GMT
  18. content-length: 52
  19. content-type: text/plain
  20. last-modified: Fri, 18 Jan 2013 16:33:31 GMT
  21. If you read this then the static file server works!
  22. ----