1.2 KiB
1.2 KiB
임도 설계 및 견적 자동화 웹앱
Phase 1 실행
개발용 백엔드와 프론트엔드 동시 실행:
.\venv\Scripts\python.exe main.py
이 명령은 FastAPI 백엔드와 Vite 프론트엔드 개발 서버를 함께 실행한다.
프론트엔드 의존성이 없으면 먼저 설치한다.
cd frontend
npm install
백엔드만 실행:
.\venv\Scripts\python.exe -m uvicorn backend.app.main:app --reload
루트의 main.py를 진입점으로 실행해도 된다.
.\venv\Scripts\python.exe -m uvicorn main:app --reload
프론트엔드 의존성 설치:
cd frontend
npm install
프론트엔드 실행:
cd frontend
npm run dev
프론트엔드를 빌드한 뒤에는 FastAPI가 빌드 결과를 직접 서빙할 수 있다.
cd frontend
npm run build
cd ..
.\venv\Scripts\python.exe -m uvicorn main:app --reload
이 경우 http://127.0.0.1:8000에서 빌드된 프론트 화면을 확인할 수 있다.
기본 접속 주소:
http://localhost:5173
Phase 1은 samples/step1_scan 샘플 데이터를 분석하고, 결과를 브라우저 대시보드에서 확인하는 단계다.