58 lines
1.6 KiB
Batchfile
58 lines
1.6 KiB
Batchfile
|
|
@echo off
|
||
|
|
title Atomizer Dashboard Launcher
|
||
|
|
color 0A
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo ============================================================
|
||
|
|
echo ATOMIZER DASHBOARD LAUNCHER
|
||
|
|
echo ============================================================
|
||
|
|
echo.
|
||
|
|
|
||
|
|
:: Configuration
|
||
|
|
set BACKEND_PORT=8001
|
||
|
|
set FRONTEND_PORT=3003
|
||
|
|
set CONDA_PATH=C:\Users\antoi\anaconda3
|
||
|
|
set CONDA_ENV=atomizer
|
||
|
|
|
||
|
|
:: Get the directory where this script is located
|
||
|
|
set SCRIPT_DIR=%~dp0
|
||
|
|
|
||
|
|
:: Check if conda exists at the expected path
|
||
|
|
if not exist "%CONDA_PATH%\Scripts\activate.bat" (
|
||
|
|
echo [ERROR] Conda not found at %CONDA_PATH%
|
||
|
|
echo Please update CONDA_PATH in this script.
|
||
|
|
pause
|
||
|
|
exit /b 1
|
||
|
|
)
|
||
|
|
|
||
|
|
echo [1/3] Starting Backend Server (port %BACKEND_PORT%)...
|
||
|
|
start "Atomizer Backend" cmd /k "call %CONDA_PATH%\Scripts\activate.bat %CONDA_ENV% && cd /d %SCRIPT_DIR%backend && python -m uvicorn api.main:app --reload --port %BACKEND_PORT%"
|
||
|
|
|
||
|
|
:: Wait a moment for backend to start
|
||
|
|
ping 127.0.0.1 -n 4 >nul
|
||
|
|
|
||
|
|
echo [2/3] Starting Frontend Dev Server...
|
||
|
|
start "Atomizer Frontend" cmd /k "cd /d %SCRIPT_DIR%frontend && npm run dev"
|
||
|
|
|
||
|
|
:: Wait for frontend to start
|
||
|
|
ping 127.0.0.1 -n 6 >nul
|
||
|
|
|
||
|
|
echo [3/3] Opening browser...
|
||
|
|
echo.
|
||
|
|
echo ============================================================
|
||
|
|
echo Dashboard is starting up!
|
||
|
|
echo.
|
||
|
|
echo Backend: http://localhost:%BACKEND_PORT%
|
||
|
|
echo Frontend: http://localhost:%FRONTEND_PORT%
|
||
|
|
echo.
|
||
|
|
echo Close the terminal windows to stop the servers.
|
||
|
|
echo ============================================================
|
||
|
|
echo.
|
||
|
|
|
||
|
|
:: Open browser to frontend
|
||
|
|
start http://localhost:%FRONTEND_PORT%
|
||
|
|
|
||
|
|
echo Dashboard launched! You can close this window.
|
||
|
|
echo.
|
||
|
|
pause
|