Getting started
Local development
Daily commands, ports, builds and tests for the source code.
All commands below start from the tradoc/ repository root.
Daily startup
.\.venv\Scripts\python.exe main.py devBy default:
- Vite frontend:
127.0.0.1:2499; - FastAPI API:
127.0.0.1:8000; - loopback bind for both Vite and FastAPI.
Custom ports
.\.venv\Scripts\python.exe main.py dev --api-port 8001 --web-port 2500Add --reload to restart the backend automatically when Python code changes.
Build the frontend
npm --prefix web run build
.\.venv\Scripts\python.exe main.py serveserve listens on 127.0.0.1:8000. Docker uses --host 0.0.0.0 on a trusted LAN.
Tests
.\.venv\Scripts\python.exe -m unittest discover -s tests -p "test_*.py"
npm --prefix web run build
npm --prefix web run test:e2ePort already in use
TraDoc refuses to start when 8000 or 2499 is busy. Stop the previous process or choose other ports; do not start multiple supervisors on the same ports.