This commit is contained in:
Team3
2026-05-25 18:43:17 +02:00
parent 145b3b25d5
commit 1cef392892
29 changed files with 3482 additions and 0 deletions

28
Makefile Normal file
View File

@@ -0,0 +1,28 @@
.PHONY: install dev prod stop remove
install:
sudo apt install -y poppler-utils libpango-1.0-0 libcairo2 libgdk-pixbuf-2.0-0 libffi-dev
pip install --break-system-packages fastapi uvicorn[standard] aiosqlite weasyprint pdf2image
cd frontend && npm install
dev:
@echo "Backend: http://localhost:8000"
@echo "Frontend: http://localhost:5173"
@cd backend && uvicorn main:app --reload --port 8000 &
@cd frontend && npx vite --port 5173
prod:
@echo "Backend: http://localhost:8000"
@cd frontend && npx vite build
@cd backend && uvicorn main:app --host 0.0.0.0 --port 8000
stop:
-@pkill -f "uvicorn main:app" 2>/dev/null
-@pkill -f "vite --port 5173" 2>/dev/null
@echo "Server gestoppt."
remove: stop
@echo "Lösche Datenbank und generierte Dateien..."
rm -f guides.db
rm -rf storage/html/* storage/pdf/*
@echo "Fertig."