summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Schoenfelder <paulschoenfelder@gmail.com>2013-12-10 01:31:01 -0600
committerPaul Schoenfelder <paulschoenfelder@gmail.com>2013-12-10 01:31:01 -0600
commit658a1808c4e1c6a9521225aba1cdddab9a45c056 (patch)
tree34ae62ffbf84be627d133fd39a8c17dd2d3dba63 /README.md
parentUpdate local process name for ExIrc supervisor module (diff)
Update README
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 9 insertions, 4 deletions
diff --git a/README.md b/README.md
index a4ea7e4..62fb6ba 100644
--- a/README.md
+++ b/README.md
@@ -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