From 335676876b3f23cdc19450bd5eea68105e8fe142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 7 Sep 2013 15:33:40 +0200 Subject: Convert the hello world example to a release --- examples/hello_world/README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'examples/hello_world/README.md') diff --git a/examples/hello_world/README.md b/examples/hello_world/README.md index dd3d948..84f3211 100644 --- a/examples/hello_world/README.md +++ b/examples/hello_world/README.md @@ -1,22 +1,25 @@ -Cowboy Hello World -================== +Hello world example +=================== -To compile this example you need rebar in your PATH. +To try this example, you need GNU `make`, `git` and +[relx](https://github.com/erlware/relx) in your PATH. -Type the following command: -``` -$ rebar get-deps compile -``` +To build the example, run the following command: -You can then start the Erlang node with the following command: +``` bash +$ make ``` -./start.sh + +To start the release in the foreground: + +``` bash +$ ./_rel/bin/hello_world_example console ``` -Then point your browser to the indicated URL. +Then point your browser at [http://localhost:8080](http://localhost:8080). -Example -------- +Example output +-------------- ``` bash $ curl -i http://localhost:8080 @@ -25,6 +28,7 @@ connection: keep-alive server: Cowboy date: Fri, 28 Sep 2012 04:10:25 GMT content-length: 12 +content-type: text/plain Hello world! ``` -- cgit v1.2.3