diff options
author | Loïc Hoguin <[email protected]> | 2013-02-06 22:19:14 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-02-06 22:19:14 +0100 |
commit | 37d24480236a5263eebbe957067f8698c78577f9 (patch) | |
tree | 73ddfccf3947c3e987ed21885431de1901d11668 /examples/elixir_hello_world/lib/elixir_hello_world.ex | |
parent | 1c5ce11d13e7144091ce9a983ed0be6fbdb95c45 (diff) | |
parent | b69903435e0278a6a91749d729f08ac01a8f623a (diff) | |
download | cowboy-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/lib/elixir_hello_world.ex')
-rw-r--r-- | examples/elixir_hello_world/lib/elixir_hello_world.ex | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/elixir_hello_world/lib/elixir_hello_world.ex b/examples/elixir_hello_world/lib/elixir_hello_world.ex new file mode 100644 index 0000000..2da484b --- /dev/null +++ b/examples/elixir_hello_world/lib/elixir_hello_world.ex @@ -0,0 +1,13 @@ +defmodule ElixirHelloWorld do + use Application.Behaviour + + def start(_type, _args) do + dispatch = :cowboy_router.compile([ + {:_, [{"/", ElixirHelloWorld.TopPageHandler, []}]} + ]) + {:ok, _} = :cowboy.start_http(:http, 100, + [port: 8080], + [env: [dispatch: dispatch]]) + ElixirHelloWorld.Supervisor.start_link + end +end |