A deployable markdown editor that connects with your self hosted files and lets you edit in a beautiful interface
at main 73 lines 2.0 kB view raw
1.PHONY: help build up down logs clean dev-backend dev-frontend test 2 3help: ## Show this help message 4 @echo 'Usage: make [target]' 5 @echo '' 6 @echo 'Available targets:' 7 @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST) 8 9build: ## Build Docker images 10 docker-compose build 11 12up: ## Start all services 13 docker-compose up -d 14 @echo "" 15 @echo "✓ MarkEdit is running!" 16 @echo " Frontend: http://localhost:4321" 17 @echo " Backend: http://localhost:8080" 18 @echo "" 19 @echo "To view logs: make logs" 20 21down: ## Stop all services 22 docker-compose down 23 24logs: ## View logs from all services 25 docker-compose logs -f 26 27logs-backend: ## View backend logs 28 docker-compose logs -f backend 29 30logs-frontend: ## View frontend logs 31 docker-compose logs -f frontend 32 33restart: ## Restart all services 34 docker-compose restart 35 36clean: ## Remove containers, volumes, and images 37 docker-compose down -v 38 docker-compose rm -f 39 @echo "Cleaned up containers and volumes" 40 41dev-backend: ## Run backend in development mode 42 cd backend && go run cmd/server/main.go 43 44dev-frontend: ## Run frontend in development mode 45 cd frontend && bun run dev 46 47install-backend: ## Install backend dependencies 48 cd backend && go mod download 49 50install-frontend: ## Install frontend dependencies 51 cd frontend && bun install 52 53test-backend: ## Run backend tests 54 cd backend && go test ./... 55 56setup: ## Initial setup (copy .env.example to .env) 57 @if [ ! -f .env ]; then \ 58 cp .env.example .env; \ 59 echo "✓ Created .env file from .env.example"; \ 60 echo "⚠ Please edit .env and add your GitHub OAuth credentials"; \ 61 else \ 62 echo "⚠ .env file already exists"; \ 63 fi 64 65db-migrate: ## Run database migrations 66 cd backend && go run cmd/server/main.go migrate 67 68health: ## Check health of all services 69 @echo "Checking backend health..." 70 @curl -s http://localhost:8080/api/health | jq . || echo "Backend not responding" 71 @echo "" 72 @echo "Checking frontend health..." 73 @curl -s http://localhost:4321/health || echo "Frontend not responding"