-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathstart.bat
More file actions
40 lines (36 loc) · 852 Bytes
/
start.bat
File metadata and controls
40 lines (36 loc) · 852 Bytes
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
@echo off
chcp 65001 >nul 2>&1
title Arona WebUI
:: Check Node.js
where node >nul 2>&1
if %errorlevel% neq 0 (
echo.
echo [ERROR] Node.js is not installed or not in PATH.
echo.
echo Please download and install Node.js 18+ from:
echo https://nodejs.org/
echo.
pause
exit /b 1
)
:: Auto-install dependencies if missing
if not exist "node_modules" (
echo Installing dependencies...
npm install --production
)
:: Read PORT from .env.local (default 18790)
set PORT=18790
if exist .env.local (
for /f "tokens=1,* delims==" %%A in (.env.local) do (
if "%%A"=="PORT" set PORT=%%B
)
)
:: Start server
echo Starting Arona WebUI on port %PORT% ...
start "" "http://localhost:%PORT%"
node src/server.mjs
if %errorlevel% neq 0 (
echo.
echo [ERROR] Server exited with an error.
pause
)