Init: bootstrap

This commit is contained in:
Yi-Ting Shih committed 2025-12-07 02:33:44 +08:00
commit a4096bf1a7
16 files changed
+1052

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
.PHONY: all swagger docker install test bench
SWAG ?= go run github.com/swaggo/swag/cmd/[email protected]
GO_ENV += CGO_ENABLED=0
SOURCE := $(shell find . -type f -name '*.go')
TARGET := backend
all: swagger docker install
docker: $(TARGET)
docker compose up -d --force-recreate --build backend
install:
$(GO_ENV) go install
test:
go test -v ./tests/units
bench:
go test -bench=. ./tests/benchmarks
swagger:
$(SWAG) fmt
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
$(TARGET): $(SOURCE)
$(GO_ENV) go build -o $@