init
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
.PHONY: start dev backend frontend install stop
|
||||
|
||||
# 一键启动前后端(推荐)
|
||||
start dev:
|
||||
@bash ./start.sh
|
||||
|
||||
backend:
|
||||
cd backend && go run ./cmd/server
|
||||
|
||||
frontend:
|
||||
cd frontend && npm run dev
|
||||
|
||||
install:
|
||||
cd backend && go mod tidy
|
||||
cd frontend && npm install
|
||||
|
||||
# 停止占用默认端口的进程
|
||||
stop:
|
||||
@-lsof -tiTCP:8080 -sTCP:LISTEN | xargs kill 2>/dev/null || true
|
||||
@-lsof -tiTCP:5173 -sTCP:LISTEN | xargs kill 2>/dev/null || true
|
||||
@echo "已尝试停止 8080 / 5173 端口服务"
|
||||
Reference in New Issue
Block a user