-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.bat
More file actions
46 lines (40 loc) · 1.13 KB
/
Copy pathstart.bat
File metadata and controls
46 lines (40 loc) · 1.13 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
@echo off
echo Talent Intelligence Platform - Setup and Launch
echo ================================================
echo.
:: Check Node.js
node --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Node.js is not installed.
echo Download it from https://nodejs.org and re-run this script.
pause
exit /b 1
)
for /f "tokens=*" %%v in ('node --version') do set NODE_VER=%%v
echo Node.js %NODE_VER% found.
:: Install dependencies if needed
if not exist "node_modules\" (
echo.
echo Installing dependencies ^(first run only^)...
npm install
if errorlevel 1 (
echo ERROR: npm install failed. Check the output above.
pause
exit /b 1
)
)
:: Copy .env.local silently if missing
if not exist ".env.local" (
if exist ".env.local.example" (
copy ".env.local.example" ".env.local" >nul
)
)
:: Open browser after short delay
echo.
echo Starting server at http://localhost:3000
echo You can enter your API keys and configure your data source in the app.
echo Press Ctrl+C to stop.
echo.
start "" /B cmd /c "timeout /t 3 /nobreak >nul && start http://localhost:3000"
:: Start server
npm run dev