-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
43 lines (39 loc) · 952 Bytes
/
Copy pathstart.bat
File metadata and controls
43 lines (39 loc) · 952 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
41
42
43
@echo off
chcp 65001 >nul
echo ========================================
echo API Router Startup Script
echo ========================================
echo.
echo Starting API Router Server...
echo Server URL: http://localhost:3001
echo.
echo Press Ctrl+C to stop server
echo ========================================
echo.
REM Check if Node.js is installed
node --version >nul 2>&1
if %errorlevel% neq 0 (
echo Error: Node.js not found
echo Please install Node.js: https://nodejs.org/
pause
exit /b 1
)
REM Check if dependencies are installed
if not exist "node_modules" (
echo Installing dependencies...
npm install
if %errorlevel% neq 0 (
echo Dependency installation failed
pause
exit /b 1
)
echo Dependencies installed successfully
echo.
)
REM Start server
echo Starting API Router Server...
node src/main/server.js
REM If server exits unexpectedly
echo.
echo Server stopped
pause