-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
59 lines (51 loc) Β· 1.9 KB
/
start.bat
File metadata and controls
59 lines (51 loc) Β· 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@echo off
setlocal enabledelayedexpansion
:: =========================================================
:: π CRYPTO LEARN - PROJECT STARTUP PROTOCOL (Windows)
:: =========================================================
echo ---------------------------------------------------------
echo Initializing CryptoLearn Services...
echo ---------------------------------------------------------
:: Check for existing directories
if not exist "backend" (
echo [ERROR] Backend directory not found.
pause
exit /b 1
)
if not exist "frontend" (
echo [ERROR] Frontend directory not found.
pause
exit /b 1
)
:: π‘ START BACKEND
echo [BACKEND] Spinning up FastAPI server...
cd backend
if exist "venv\Scripts\activate.bat" (
:: Run in background window
start "CryptoLearn - Backend" cmd /k "echo Activating Venv... && call venv\Scripts\activate && uvicorn main:app --reload --host 0.0.0.0 --port 8000"
) else (
echo [WARNING] No venv found in backend folder. Attempting standard run.
start "CryptoLearn - Backend" cmd /k "uvicorn main:app --reload --host 0.0.0.0 --port 8000"
)
cd ..
:: Wait slightly to avoid port collisions/race conditions
timeout /t 2 >nul
:: π» START FRONTEND
echo [FRONTEND] Spinning up Next.js dev server...
cd frontend
start "CryptoLearn - Frontend" cmd /k "npm run dev"
cd ..
:: π OPEN WEBSITE
echo [BROWSER] Opening CryptoLearn at http://localhost:3000...
timeout /t 3 >nul
start http://localhost:3000
echo ---------------------------------------------------------
echo β
BOOT SEQUENCE COMPLETE
echo π Frontend: http://localhost:3000
echo π οΈ Backend: http://localhost:8000
echo π Swagger: http://localhost:8000/docs
echo ---------------------------------------------------------
echo Both services are now running in separate terminal windows.
echo Close those windows to stop the servers.
echo ---------------------------------------------------------
pause