summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-01-09 07:23:56 +0100
committerLoïc Hoguin <[email protected]>2012-01-09 07:23:56 +0100
commit64fcd99b93dcd911d26656ee4bc5359b80b7e955 (patch)
treebb5421a1f0bfc707e94d0649c208d99385fc9806
parenta76c29ab6c63d383434d798df5c8c6b50899b590 (diff)
downloadbullet-64fcd99b93dcd911d26656ee4bc5359b80b7e955.tar.gz
bullet-64fcd99b93dcd911d26656ee4bc5359b80b7e955.tar.bz2
bullet-64fcd99b93dcd911d26656ee4bc5359b80b7e955.zip
Add dispatch options documentation to the README
-rw-r--r--README.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2edfebd..f2e357c 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,24 @@ provides an optional heartbeat which is managed on the client side.
Today Bullet only supports websocket and long-polling transports.
+Dispatch options
+----------------
+
+Similar to any other handler, you need to setup the dispatch list before
+you can access your Bullet handlers. Bullet itself is a Cowboy HTTP
+handler that translates some of the lower-level functions into a
+simplified higher-level interface.
+
+The dispatch options for a Bullet handler looks as follow:
+
+``` erlang
+{[<<"path">>, <<"to">>, <<"bullet">>], bullet_handler,
+ [{handler, my_stream}]}
+```
+
+Simply define this in your dispatch list and your handler will be
+available and handled by Bullet properly.
+
Cowboy handler
--------------