David N. Welton f5c37a789c Add an index.html that is also served statically as the default for / 10 years ago
..
priv f5c37a789c Add an index.html that is also served statically as the default for / 10 years ago
src f5c37a789c Add an index.html that is also served statically as the default for / 10 years ago
Makefile 18f50b8697 Make examples use Cowboy master 10 years ago
README.md abcc6e96d8 Update erlang.mk and update paths to start the release 10 years ago
relx.config 28f90b81fa Convert the static handler example to a release 11 years ago

README.md

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:

$ make

To start the release in the foreground:

$ ./_rel/static_world_example/bin/static_world_example console

The example will serve all the files found in the priv directory. For example:

Example output

$ 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!