Files
jiangmingzhao-daily-report/check_services.bat

71 lines
1.5 KiB
Batchfile
Raw Normal View History

@echo off
chcp 65001 >nul
echo 🔍 检查企业级日报系统服务状态...
echo.
echo 📊 检查端口占用情况:
echo.
echo 🔌 后端服务 (端口 8000):
netstat -an | findstr ":8000" >nul
if %errorlevel%==0 (
echo ✅ 端口 8000 有活动连接
netstat -an | findstr ":8000"
) else (
echo ❌ 端口 8000 没有活动连接
)
echo.
echo 🎨 前端服务 (端口 3000):
netstat -an | findstr ":3000" >nul
if %errorlevel%==0 (
echo ✅ 端口 3000 有活动连接
netstat -an | findstr ":3000"
) else (
echo ❌ 端口 3000 没有活动连接
)
echo.
echo 🔍 检查Python进程:
tasklist | findstr python >nul
if %errorlevel%==0 (
echo ✅ 发现Python进程
tasklist | findstr python
) else (
echo ❌ 没有发现Python进程
)
echo.
echo 🔍 检查Node进程:
tasklist | findstr node >nul
if %errorlevel%==0 (
echo ✅ 发现Node进程
tasklist | findstr node
) else (
echo ❌ 没有发现Node进程
)
echo.
echo 📋 访问测试:
echo 🌐 前端应用: http://localhost:3000
echo 🔌 API接口: http://localhost:8000/api/
echo 👑 管理后台: http://localhost:8000/admin/
echo.
echo 🧪 快速测试选项:
echo [1] 打开API测试页面
echo [2] 打开功能演示页面
echo [3] 尝试访问管理后台
echo [4] 尝试访问前端应用
echo.
set /p choice="选择测试选项 (1-4): "
if "%choice%"=="1" start test_api.html
if "%choice%"=="2" start demo_static.html
if "%choice%"=="3" start http://localhost:8000/admin/
if "%choice%"=="4" start http://localhost:3000
echo.
pause