-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-server.bat
More file actions
36 lines (31 loc) · 1.03 KB
/
start-server.bat
File metadata and controls
36 lines (31 loc) · 1.03 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
@echo off
title Duo Journal Server
echo ========================================
echo Duo Journal - Starting Services...
echo ========================================
echo.
:: Start Vite dev server in background
echo [1/2] Starting Vite dev server on port 5173...
cd /d "e:\SJTU\Projects\Hackathon\Diary\duo-journal"
start "Vite Dev Server" cmd /c "npm run dev -- --port 5173 --host"
:: Wait for Vite to be ready
echo Waiting for Vite to start...
timeout /t 5 /nobreak >nul
:: Start ngrok
echo [2/2] Starting ngrok tunnel...
start "ngrok" cmd /c "ngrok http 5173"
echo.
echo ========================================
echo Both services are running!
echo Local: http://localhost:5173
echo ngrok: Check the ngrok window for URL
echo ========================================
echo.
echo Press any key to STOP all services...
pause >nul
:: Cleanup - kill both processes
echo Shutting down...
taskkill /fi "windowtitle eq Vite Dev Server" /f >nul 2>&1
taskkill /fi "windowtitle eq ngrok" /f >nul 2>&1
taskkill /im ngrok.exe /f >nul 2>&1
echo Done.