diff options
author | Paul Schoenfelder <paulschoenfelder@gmail.com> | 2013-12-10 01:31:01 -0600 |
---|---|---|
committer | Paul Schoenfelder <paulschoenfelder@gmail.com> | 2013-12-10 01:31:01 -0600 |
commit | 658a1808c4e1c6a9521225aba1cdddab9a45c056 (patch) | |
tree | 34ae62ffbf84be627d133fd39a8c17dd2d3dba63 /README.md | |
parent | Update local process name for ExIrc supervisor module (diff) |
Update README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -17,12 +17,17 @@ Alpha. The API is complete and everything is implemented, but little testing has ## Getting Started -Add ExIrc as a dependency to your project in mix.exs: +Add ExIrc as a dependency to your project in mix.exs, and add it as an application: ```elixir defp deps do [{:exirc, github: "bitwalker/exirc"}] end + + defp application do + [applications: [:exirc], + ...] + end ``` Then fetch it using `mix deps.get`. @@ -47,9 +52,9 @@ defmodule ExampleSupervisor do :gen_server.start_link(__MODULE__, [State.new()]) end - def init([state]) do - # Start the client and handler processes - {:ok, client} = ExIrc.Client.start!() + def init(state) do + # Start the client and handler processes, the ExIrc supervisor is automatically started when your app runs + {:ok, client} = ExIrc.start_client!() {:ok, handler} = ExampleHandler.start_link(nil) # Register the event handler with ExIrc |