🔧 Fix frontend warnings and add diagnostic tools

Fix:
- Add type: module to package.json to eliminate ES module warning
- Create separate backend/frontend startup scripts
- Add system status check tool

New files:
- check_status.bat: Diagnose system status
- start_backend_only.bat: Start backend separately
- start_frontend_only.bat: Start frontend separately

🚀 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-01 13:54:05 +08:00
parent 3a9bf04401
commit 018ed27099
5 changed files with 3094 additions and 0 deletions

44
start_backend_only.bat Normal file
View File

@@ -0,0 +1,44 @@
@echo off
title QQuiz Backend Server
color 0B
echo.
echo ========================================
echo Starting QQuiz Backend Server
echo ========================================
echo.
cd /d "%~dp0backend"
if not exist "venv\Scripts\activate.bat" (
echo Creating virtual environment...
python -m venv venv
)
echo Activating virtual environment...
call venv\Scripts\activate.bat
echo.
echo Installing/updating dependencies...
pip install -q -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
echo.
echo Running database migrations...
alembic upgrade head
echo.
echo ========================================
echo Backend Server Starting...
echo ========================================
echo.
echo API URL: http://localhost:8000
echo API Docs: http://localhost:8000/docs
echo Health: http://localhost:8000/health
echo.
echo Press Ctrl+C to stop
echo ========================================
echo.
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
pause