33 lines
709 B
Batchfile
33 lines
709 B
Batchfile
@echo off
|
|
REM Simple Test - Check if server.js works
|
|
echo Testing server.js directly...
|
|
echo.
|
|
|
|
cd /d "%~dp0\dist"
|
|
|
|
echo [1/2] Checking Node.js...
|
|
where node >nul 2>&1
|
|
if %errorLevel% neq 0 (
|
|
echo [ERROR] Node.js not found!
|
|
pause
|
|
exit /b 1
|
|
)
|
|
node --version
|
|
|
|
echo.
|
|
echo [2/2] Testing server.js (will fail on port, but that's OK)...
|
|
timeout /t 2 >nul
|
|
node server.js 2>&1 | findstr /C:"Server running" /C:"EADDRINUSE" /C:"Error"
|
|
if %errorLevel% equ 0 (
|
|
echo [OK] server.js code is valid - can execute
|
|
) else (
|
|
echo [WARNING] server.js may have issues
|
|
)
|
|
|
|
echo.
|
|
echo If you see "EADDRINUSE" - that's GOOD! It means server.js works.
|
|
echo The issue is just IIS/iisnode configuration.
|
|
echo.
|
|
pause
|
|
|