Loïc Hoguin d063511a0e Update Ranch to 0.8.1 12 years ago
..
lib b69903435e Elixir hello world example 12 years ago
test b69903435e Elixir hello world example 12 years ago
README.md b69903435e Elixir hello world example 12 years ago
mix.exs d063511a0e Update Ranch to 0.8.1 12 years ago

README.md

Elixir Hello World

This is an example of running Cowboy with Elixir.

You need Elixir installed (instructions here) to run this example. After installing Elixir, you should have both elixir and mix executables available.

You also need 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

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