diff --git a/start-gateway.bat b/start-gateway.bat index c80894a..c5b2823 100644 --- a/start-gateway.bat +++ b/start-gateway.bat @@ -1,3 +1,34 @@ @echo off cd /d "%~dp0" + +where node >nul 2>nul +if errorlevel 1 ( + echo [错误] 未找到 node,请先安装 Node.js 或将其加入 PATH。 + pause + exit /b 1 +) + +if not defined PORT set "PORT=9109" +if defined GATEWAY_TOKEN ( + set "TOKEN=%GATEWAY_TOKEN%" +) else ( + set /p TOKEN=