Loïc Hoguin 6672ea0415 Review, improve and document the static files handler 11 лет назад
..
priv f96e20aef7 Rename example 'static' to 'static_world' to avoid confusion 12 лет назад
src 6672ea0415 Review, improve and document the static files handler 11 лет назад
Makefile 4769412daa erlang.mk now has built-in support for relx 11 лет назад
README.md 96755dd973 No need for relx in path for examples anymore 11 лет назад
relx.config 28f90b81fa Convert the static handler example to a release 11 лет назад

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