forked from otoalchemist/DT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
23 lines (20 loc) · 792 Bytes
/
Copy pathstart.bat
File metadata and controls
23 lines (20 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@echo off
cd /d "%~dp0"
:: Install dependencies on first run (or after a clean clone)
if not exist "node_modules" (
echo Installing dependencies, this may take a minute...
call npm install
if errorlevel 1 (
echo.
echo ERROR: npm install failed. Make sure Node.js 20+ is installed.
echo Download it from https://nodejs.org
pause
exit /b 1
)
)
:: Free ports used by a previous run
for /f "tokens=5" %%a in ('netstat -ano 2^>nul ^| findstr ":5173 " ^| findstr "LISTENING"') do taskkill /PID %%a /F >nul 2>&1
for /f "tokens=5" %%a in ('netstat -ano 2^>nul ^| findstr ":8787 " ^| findstr "LISTENING"') do taskkill /PID %%a /F >nul 2>&1
start "Death & Taxes Bot" cmd /k "npm run dev"
timeout /t 6 /nobreak >nul
start http://localhost:5173