feat: initialize rust backend with axum server, seaorm models, and project scaffolding
This commit is contained in:
72
Makefile
Normal file
72
Makefile
Normal file
@@ -0,0 +1,72 @@
|
||||
# zhealth Makefile
|
||||
# Run `make help` to see available commands
|
||||
|
||||
.PHONY: help dev build release lint typecheck test clean serve
|
||||
|
||||
# Default target
|
||||
help:
|
||||
@echo "Available commands:"
|
||||
@echo " make dev - Start development servers"
|
||||
@echo " make build - Build for development"
|
||||
@echo " make release - Build optimized production bundle"
|
||||
@echo " make lint - Run linters (Clippy + ESLint)"
|
||||
@echo " make typecheck - Type checking (Rust + TypeScript)"
|
||||
@echo " make test - Run all tests"
|
||||
@echo " make serve - Serve production build locally"
|
||||
@echo " make clean - Clean build artifacts"
|
||||
|
||||
# Backend commands
|
||||
.PHONY: backend-dev backend-build backend-release backend-lint backend-test
|
||||
|
||||
backend-dev:
|
||||
cd backend && cargo run
|
||||
|
||||
backend-build:
|
||||
cd backend && cargo build
|
||||
|
||||
backend-release:
|
||||
cd backend && cargo build --release
|
||||
|
||||
backend-lint:
|
||||
cd backend && cargo clippy -- -D warnings
|
||||
|
||||
backend-test:
|
||||
cd backend && cargo test
|
||||
|
||||
# Frontend commands (placeholder for when frontend is set up)
|
||||
.PHONY: frontend-dev frontend-build frontend-release frontend-lint frontend-test
|
||||
|
||||
frontend-dev:
|
||||
@echo "Frontend not yet configured"
|
||||
|
||||
frontend-build:
|
||||
@echo "Frontend not yet configured"
|
||||
|
||||
frontend-release:
|
||||
@echo "Frontend not yet configured"
|
||||
|
||||
frontend-lint:
|
||||
@echo "Frontend not yet configured"
|
||||
|
||||
frontend-test:
|
||||
@echo "Frontend not yet configured"
|
||||
|
||||
# Combined commands
|
||||
dev: backend-dev
|
||||
|
||||
build: backend-build frontend-build
|
||||
|
||||
release: backend-release frontend-release
|
||||
|
||||
lint: backend-lint frontend-lint
|
||||
|
||||
typecheck: backend-lint frontend-lint
|
||||
|
||||
test: backend-test frontend-test
|
||||
|
||||
serve:
|
||||
cd backend && cargo run --release
|
||||
|
||||
clean:
|
||||
cd backend && cargo clean
|
||||
@echo "Cleaned backend artifacts"
|
||||
Reference in New Issue
Block a user