2
0

makefile 541 B

123456789101112131415161718192021
  1. FRONTEND_DIR = ./web
  2. BACKEND_DIR = .
  3. .PHONY: all start-frontend start-backend
  4. all: start-frontend start-backend
  5. build-frontend:
  6. @echo "Building frontend..."
  7. @cd $(FRONTEND_DIR) && npm install && DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build npm run build
  8. # 启动前端开发服务器
  9. start-frontend:
  10. @echo "Starting frontend dev server..."
  11. @cd $(FRONTEND_DIR) && npm start &
  12. # 启动后端开发服务器
  13. start-backend:
  14. @echo "Starting backend dev server..."
  15. @cd $(BACKEND_DIR) && go run main.go &