From 52a0156c9886dd1ca37378a0c3805cdd2fcf70c0 Mon Sep 17 00:00:00 2001 From: David Orozco Date: Fri, 13 Dec 2024 16:06:07 -0500 Subject: [PATCH] add instructions for how to use air --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index f23a789..7da2c3b 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,30 @@ To uninstall: ```bash kubectl delete ns "${NAMESPACE}" ``` + + +## Development + +### Frontend + +To run frontend you could easily run with `air` that helps with hot-reload. + +Before running `air` or manual steps you have to set up the following env +```shell +export KAFKA_BROKER=kafka-headless.namespace.svc:9092 +export REDIS_ADDR=redis.namespace.svc:6379 +export FRONTEND_LOCATION_ADDR=location.namespace.svc:8081 +``` + +Now let's run the frontend +```shell +air +``` + +That will listen for the changes and restart the server every change. + +If no want to use this approach, you could +```shell +make build-frontend-app +go run ./cmd/hotrod/main.go frontend +```