HUTAMS_AUDIO/open_dashboard.ps1

37 lines
1.9 KiB
PowerShell

# ─────────────────────────────────────────────────────────────────────────────
# open_dashboard.ps1 — HUTAMS 프론트엔드 대시보드 열기 스크립트
# 사용법: .\open_dashboard.ps1
# 참고: 백엔드 서버(run_server.ps1)가 먼저 실행 중이어야 합니다.
# ─────────────────────────────────────────────────────────────────────────────
$serverUrl = "http://localhost:28000"
$ws_url = "ws://localhost:28000/api/v1/ws/live"
# 서버 응답 확인
try {
$response = Invoke-WebRequest -Uri $serverUrl -TimeoutSec 3 -ErrorAction Stop
Write-Host "서버 응답 확인: $($response.StatusCode) OK" -ForegroundColor Green
}
catch {
Write-Warning "서버가 응답하지 않습니다. run_server.ps1을 먼저 실행하세요."
Write-Host "5초 후 브라우저를 열겠습니다..." -ForegroundColor Yellow
Start-Sleep -Seconds 5
}
Write-Host ""
Write-Host "=================================" -ForegroundColor Cyan
Write-Host " HUTAMS 관제 대시보드" -ForegroundColor Cyan
Write-Host " URL : $serverUrl" -ForegroundColor White
Write-Host " WS : $ws_url" -ForegroundColor White
Write-Host "=================================" -ForegroundColor Cyan
Write-Host ""
Write-Host "Live Mode 사용법:" -ForegroundColor Yellow
Write-Host " 1. 브라우저에서 대시보드 접속"
Write-Host " 2. 우측 상단 [Live Mode] 토글 ON"
Write-Host " 3. Mock 모드: sample1.m4a 파일이 실시간처럼 스트리밍됨"
Write-Host " 4. 무전 내용이 우측 패널에 타자기 효과로 표시됨"
Write-Host ""
# 기본 브라우저로 열기
Start-Process $serverUrl