From 53353da463af3ef784acbbd92872631f377b9f2e Mon Sep 17 00:00:00 2001 From: Drew Bednar Date: Mon, 16 Sep 2024 21:50:48 -0400 Subject: [PATCH] Update local dev instructions --- Makefile | 4 ++-- README.md | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 53ccffd..679b07a 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ check-deps: # https://mosquitto.org/man/mosquitto-tls-7.html # FOR LOCAL DEV ONLY! These certs do not use encryption. Use let's encrypt or a real cert. -gen-local-tls: +gen-local-tls-certs: ./scripts/gen-local-tls-certs.sh -.PHONEY: gen-local-tls +.PHONEY: gen-local-tls-certs start-dev: docker compose up -d diff --git a/README.md b/README.md index db20d4d..a364445 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,28 @@ Learning MQTT with Golang by doing. This repo is a simple example of using a Gol ## Development -For local development we use [Mosquitto](https://mosquitto.org/). Start the local development environment with: +For local development we use [Mosquitto](https://mosquitto.org/) as our MQTT broker, with TLS enabled. + +First generate local development certs using: + +``` +make gen-local-tls-certs +``` + +This will create CA, server, and client certificates suitable for local development. Server and CA certs are created in `./.mosquitto/certs`. The client cert is create in the project root. + +Start the local development environment with: ``` make start-dev ``` -Stop with +Stop the local development environment with: ``` make stop-dev ``` - ## Usage *Instructions TBD* \ No newline at end of file