feat: add API token authentication

This commit is contained in:
2025-05-03 23:04:47 +02:00
parent e62bbf8ca3
commit 1a0499d81f
6 changed files with 73 additions and 23 deletions

View File

@@ -1,3 +1,4 @@
SHELL := bash
ARCH ?= arm64
ADDR ?= 0.0.0.0:8080
@@ -10,10 +11,10 @@ build:
env GOOS=linux GOARCH=${ARCH} go build -o bin/rcond-${ARCH} ./cmd/rcond/main.go
run:
bin/rcond-${ARCH} ${ADDR}
source .env && bin/rcond-${ARCH} ${ADDR}
dev:
go run cmd/rcond/main.go ${ADDR}
RCOND_API_TOKEN=1234567890 go run cmd/rcond/main.go
upload:
scp rcond-${ARCH} pi@rpi-40ac:/home/pi/rcond