Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Refactor make run to always compile and use the correct frontend path

Kailash Nadhaf11a176f177
diff --git a/Makefile b/Makefile
index b37a3088..0434c891 100644
--- a/Makefile
+++ b/Makefile
@@ -36,10 +36,10 @@ $(FRONTEND_YARN_MODULES): frontend/package.json frontend/yarn.lock
$(BIN): $(shell find . -type f -name "*.go")
CGO_ENABLED=0 go build -o ${BIN} -ldflags="-s -w -X 'main.buildString=${BUILDSTR}' -X 'main.versionString=${VERSION}'" cmd/*.go
-# Run the backend.
+# Run the backend in dev mode. The frontend assets in dev mode are loaded from disk from frontend/dist/frontend.
.PHONY: run
-run: $(BIN)
- ./${BIN}
+run:
+ CGO_ENABLED=0 go run -ldflags="-s -w -X 'main.buildString=${BUILDSTR}' -X 'main.versionString=${VERSION}' -X 'main.frontendDir=frontend/dist/frontend'" cmd/*.go
# Build the JS frontend into frontend/dist.
$(FRONTEND_DIST): $(FRONTEND_DEPS)