A test service using hello: There are 3 answers type:
- "pong" on a "ping".
- Replies json from
priv/replies
/METHOD/* (round-robin) - You can write you own method handler. For method
foo.bar
it will bepriv/replies/foo.bar.ex
and look like:
case params do
%{"key" => 1} -> "response"
%{"key" => 2} -> "response2"
_ -> %{"error": "unknown"}
end
$> iex -S mix
Minimal requirements are:
- erlang >= 17 (better 17.5)
- elixir >= 1.0 (1.1.0-dev)
- Apple Bonjour or a compatible API such as Avahi with it's compatibility layer along with the appropriate development files:
- OS X - bundled
- Windows - Bonjour SDK
- BSD/Linux - search for Avahi in your operating systems software manager
If you install erlang on Ubuntu, install aditionally:
- erlang-parsetools
- erlang-eunit
And then:
$> mix do deps.get, compile
There are a little bit tests:
$> mix test