Initial commit
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
.PHONY: backend frontend build run clean dev
|
||||
|
||||
# Default paths — override via env or copy .env.example
|
||||
SERVERFILE_DIR ?= ./serverfiles
|
||||
MODS_DIR ?= ./serverfiles/mods
|
||||
CFG_DIR ?= ./serverfiles/cfg
|
||||
PROFILES_DIR ?= ./serverfiles/profiles
|
||||
DATA_DIR ?= ../../data
|
||||
|
||||
backend:
|
||||
cd backend && go build -o arma3-web-server ./cmd/server/
|
||||
|
||||
frontend:
|
||||
cd frontend && npm run build
|
||||
|
||||
build: backend frontend
|
||||
|
||||
run:
|
||||
cd backend && SERVERFILE_DIR=$(SERVERFILE_DIR) MODS_DIR=$(MODS_DIR) CFG_DIR=$(CFG_DIR) PROFILES_DIR=$(PROFILES_DIR) DATA_DIR=$(DATA_DIR) GIN_MODE=debug go run ./cmd/server/
|
||||
|
||||
dev:
|
||||
cd backend && SERVERFILE_DIR=$(SERVERFILE_DIR) MODS_DIR=$(MODS_DIR) CFG_DIR=$(CFG_DIR) PROFILES_DIR=$(PROFILES_DIR) DATA_DIR=$(DATA_DIR) GIN_MODE=debug go run ./cmd/server/ &
|
||||
cd frontend && npm run dev
|
||||
|
||||
clean:
|
||||
rm -f backend/arma3-web-server
|
||||
rm -rf frontend/dist
|
||||
Reference in New Issue
Block a user