aboutsummaryrefslogtreecommitdiffstats
path: root/examples/elixir_hello_world/README.md
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-02-06 22:19:14 +0100
committerLoïc Hoguin <[email protected]>2013-02-06 22:19:14 +0100
commit37d24480236a5263eebbe957067f8698c78577f9 (patch)
tree73ddfccf3947c3e987ed21885431de1901d11668 /examples/elixir_hello_world/README.md
parent1c5ce11d13e7144091ce9a983ed0be6fbdb95c45 (diff)
parentb69903435e0278a6a91749d729f08ac01a8f623a (diff)
downloadcowboy-37d24480236a5263eebbe957067f8698c78577f9.tar.gz
cowboy-37d24480236a5263eebbe957067f8698c78577f9.tar.bz2
cowboy-37d24480236a5263eebbe957067f8698c78577f9.zip
Merge branch 'elixir-example' of git://github.com/yrashk/cowboy
Diffstat (limited to 'examples/elixir_hello_world/README.md')
-rw-r--r--examples/elixir_hello_world/README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/elixir_hello_world/README.md b/examples/elixir_hello_world/README.md
new file mode 100644
index 0000000..09fef39
--- /dev/null
+++ b/examples/elixir_hello_world/README.md
@@ -0,0 +1,42 @@
+Elixir Hello World
+==================
+
+This is an example of running Cowboy with [Elixir](http://elixir-lang.org).
+
+You need Elixir installed
+([instructions here](http://elixir-lang.org/getting_started/1.html))
+to run this example. After installing Elixir, you should have both
+`elixir` and `mix` executables available.
+
+You also need [rebar](https://github.com/rebar/rebar) in your PATH
+to compile dependencies.
+
+Then type the following command:
+
+```
+mix deps.get
+```
+
+The command above will fetch all dependencies and compile them.
+
+You can then start the Erlang node with the following command:
+
+```
+mix run --no-halt
+```
+
+Then point your browser to localhost:8080.
+
+Example
+-------
+
+``` bash
+$ curl -i http://localhost:8080
+HTTP/1.1 200 OK
+connection: keep-alive
+server: Cowboy
+date: Fri, 28 Sep 2012 04:10:25 GMT
+content-length: 12
+
+Hello world!
+```