From b7a6912290fe691e79a7343c9ca899ce061d29c4 Mon Sep 17 00:00:00 2001 From: "niten\" (aider)" Date: Sun, 8 Jun 2025 10:30:28 -0700 Subject: [PATCH] feat: Add project description and usage instructions to README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index e69de29..7cef161 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,33 @@ +# Milquetoast + +Milquetoast is a Clojure library for interacting with MQTT brokers. It provides a simple and intuitive API for sending and receiving messages, subscribing to topics, and managing MQTT connections. + +## Usage + +First, connect to the MQTT broker: + +```clojure +(def client (milquetoast.api/connect! :host "localhost" :port 1883)) +``` + +To send a message: + +```clojure +(milquetoast.api/send! client "test/topic" "Hello, MQTT!") +``` + +To subscribe to a topic and receive messages: + +```clojure +(def chan (milquetoast.api/subscribe! client "test/topic")) +``` + +You can then take messages from the channel as they arrive. + +To disconnect from the broker: + +```clojure +(milquetoast.api/stop! client) +``` + +For more detailed usage, see the API documentation and the example code in the `examples` directory.