Files
qiniu-feishu-bot/check-env.bat
编程专家 0d98013464 feat: 添加 Windows 专用部署脚本
- deploy-windows.bat: 一键部署脚本 (Node.js + PM2)
- docker-windows.bat: Docker 一键部署脚本
- manage-windows.bat: 服务管理工具 (启动/停止/日志/自启)
- check-env.bat: 环境检查工具
- uninstall.bat: 卸载清理工具
- WINDOWS_DEPLOY.md: Windows 部署完整文档
2026-03-25 08:23:50 +08:00

96 lines
2.2 KiB
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001 >nul
echo ========================================
echo 环境检查工具
echo ========================================
echo.
REM 检查 Node.js
echo [检查] Node.js...
where node >nul 2>nul
if %errorlevel% neq 0 (
echo [✗] 未安装 Node.js
echo 下载地址https://nodejs.org/
) else (
for /f "tokens=2" %%i in ('node -v') do echo [✓] Node.js 版本:%%i
)
echo.
echo [检查] npm...
where npm >nul 2>nul
if %errorlevel% neq 0 (
echo [✗] 未安装 npm
) else (
for /f "tokens=*" %%i in ('npm -v') do echo [✓] npm 版本:%%i
)
echo.
echo [检查] PM2...
where pm2 >nul 2>nul
if %errorlevel% neq 0 (
echo [✗] 未安装 PM2
echo 运行npm install -g pm2
) else (
for /f "tokens=3" %%i in ('pm2 -v') do echo [✓] PM2 版本:%%i
)
echo.
echo [检查] Docker...
where docker >nul 2>nul
if %errorlevel% neq 0 (
echo [✗] 未安装 Docker
echo 下载地址https://www.docker.com/products/docker-desktop/
) else (
for /f "tokens=*" %%i in ('docker --version') do echo [✓] Docker: %%i
)
echo.
echo [检查] 端口 3030...
netstat -ano | findstr :3030 >nul 2>nul
if %errorlevel% equ 0 (
echo [⚠] 端口 3030 已被占用
echo 占用进程 PID:
netstat -ano | findstr :3030
) else (
echo [✓] 端口 3030 可用
)
echo.
echo [检查] .env 文件...
if exist .env (
echo [✓] .env 文件存在
echo.
echo [检查] 环境变量配置:
findstr /C:"FEISHU_APP_ID=" .env
findstr /C:"FEISHU_APP_SECRET=" .env
findstr /C:"FEISHU_VERIFICATION_TOKEN=" .env
findstr /C:"FEISHU_ENCRYPT_KEY=" .env
) else (
echo [✗] .env 文件不存在
echo 请复制 .env.example 并配置
)
echo.
echo [检查] node_modules...
if exist node_modules (
echo [✓] 依赖已安装
) else (
echo [✗] 依赖未安装
echo 运行npm install
)
echo.
echo [检查] config 目录...
if exist config\qiniu-config.json (
echo [✓] 配置文件存在
) else (
echo [✗] 配置文件不存在
echo 请创建 config\qiniu-config.json
)
echo.
echo ========================================
echo 检查完成!
echo ========================================
pause