summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-10-10 14:23:21 -0600
committermo khan <mo@mokhan.ca>2014-10-10 14:23:21 -0600
commitbbff8a8064289cec36dbf07474b7bda1361b5a67 (patch)
tree4b3ebf33c8cf7e1ad3d31ad4f96c9900c9d20d37
parent453287880497ed5ae0c9ba796b9f8e1b15bc29cb (diff)
add readme on how to use the chat program.
-rw-r--r--lib/6-chit-chat/README.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/6-chit-chat/README.md b/lib/6-chit-chat/README.md
new file mode 100644
index 0000000..87885c4
--- /dev/null
+++ b/lib/6-chit-chat/README.md
@@ -0,0 +1,42 @@
+# Chit Chat
+
+This is a tiny little chat program, that shells out to 'say' to have
+your computer convert to text to audio for you.
+
+You can subscribe to all users in the topic exchange or specific users.
+Queues are created using the name of the user logged in.
+
+In order to use this, one person will have to act as the RabbitMQ host.
+
+You will need to either export an environment variable to specify the
+environment variable with each of the below commands.
+
+```bash
+$ export RABBIT_HOST=<servername>
+```
+
+To start the listener.
+
+This will listen to all users on the exchange.
+
+```bash
+λ ruby lib/6-chit-chat/subscribe.rb
+ [*] Waiting for gossip from ["#"]. To exit press CTRL+C
+```
+
+You can specify specific routing keys to only listen to specific users.
+
+```bash
+λ ruby lib/6-chit-chat/subscribe.rb mo joe
+ [*] Waiting for gossip from ["mo", "joe"]. To exit press CTRL+C
+```
+
+To start participating in the conversation you can start the REPL.
+
+```bash
+λ ruby lib/6-chit-chat/publish.rb
+>
+```
+
+Type your message and hit enter to publish the message to all connected
+subscribers.