启动.bat 786 B

12345678910111213141516171819202122232425262728293031
  1. @echo off
  2. rem ===================================================================
  3. rem Customs Data Agent - one click start
  4. rem Double click this file. It will:
  5. rem 1. check Node.js / Python
  6. rem 2. install missing dependencies
  7. rem 3. start tools service (Python) + BFF (Node)
  8. rem 4. open the browser
  9. rem ===================================================================
  10. setlocal
  11. cd /d "%~dp0"
  12. chcp 65001 >nul
  13. where node >nul 2>nul
  14. if errorlevel 1 (
  15. echo.
  16. echo [ERROR] Node.js not found.
  17. echo Please install Node.js 22 or newer from https://nodejs.org/ and try again.
  18. echo.
  19. pause
  20. exit /b 1
  21. )
  22. node "scripts\start.mjs" %*
  23. set EXITCODE=%errorlevel%
  24. if not "%EXITCODE%"=="0" (
  25. echo.
  26. echo Startup failed with exit code %EXITCODE%.
  27. pause
  28. )
  29. exit /b %EXITCODE%