start.ps1 1.2 KB

1234567891011121314151617181920212223242526
  1. # 多机型语音播报模板运营系统 - 一键启动脚本
  2. Write-Host "正在启动多机型语音播报模板运营系统..." -ForegroundColor Cyan
  3. Write-Host ""
  4. # 启动后端
  5. Write-Host "[1/2] 启动后端服务..." -ForegroundColor Yellow
  6. Start-Process pwsh -ArgumentList "-NoExit", "-Command", "conda activate rec; Set-Location '$PSScriptRoot\backend'; uvicorn app.main:app --reload --host 0.0.0.0 --port 8000"
  7. # 等待后端启动
  8. Start-Sleep -Seconds 3
  9. # 启动前端
  10. Write-Host "[2/2] 启动前端服务..." -ForegroundColor Yellow
  11. Start-Process pwsh -ArgumentList "-NoExit", "-Command", "Set-Location '$PSScriptRoot\frontend'; npm run dev"
  12. Write-Host ""
  13. Write-Host "========================================" -ForegroundColor Green
  14. Write-Host "启动完成!" -ForegroundColor Green
  15. Write-Host "========================================" -ForegroundColor Green
  16. Write-Host ""
  17. Write-Host "后端服务: http://localhost:8000" -ForegroundColor Cyan
  18. Write-Host "API 文档: http://localhost:8000/docs" -ForegroundColor Cyan
  19. Write-Host "前端界面: http://localhost:5173" -ForegroundColor Cyan
  20. Write-Host ""
  21. Write-Host "按 Ctrl+C 可关闭此窗口(不影响已启动的服务)" -ForegroundColor Gray