Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
37
monitor-vite-errors.sh
Executable file
37
monitor-vite-errors.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "启动Vite开发服务器并监控错误..."
|
||||
|
||||
# 创建日志文件
|
||||
LOG_FILE="vite-errors.log"
|
||||
> $LOG_FILE
|
||||
|
||||
# 启动开发服务器并将输出重定向到日志文件
|
||||
cd /Users/hahaha/telegram-management-system/frontend-vben
|
||||
pnpm dev:antd 2>&1 | tee -a $LOG_FILE &
|
||||
SERVER_PID=$!
|
||||
|
||||
echo "服务器已启动,PID: $SERVER_PID"
|
||||
echo "等待服务器启动..."
|
||||
sleep 5
|
||||
|
||||
# 使用curl访问页面触发错误
|
||||
echo "访问页面..."
|
||||
curl -s http://localhost:5173/ > /dev/null
|
||||
|
||||
# 监控日志文件
|
||||
echo "监控错误输出..."
|
||||
tail -f $LOG_FILE | grep -E "ERROR|error|Error|failed|Failed" &
|
||||
TAIL_PID=$!
|
||||
|
||||
# 等待一段时间
|
||||
sleep 10
|
||||
|
||||
# 显示捕获的错误
|
||||
echo -e "\n\n=== 捕获的错误 ==="
|
||||
grep -E "ERROR|error|Error|failed|Failed|warning|Warning" $LOG_FILE || echo "没有发现明显的错误"
|
||||
|
||||
# 清理
|
||||
kill $SERVER_PID $TAIL_PID 2>/dev/null
|
||||
|
||||
echo -e "\n完整日志保存在: $LOG_FILE"
|
||||
Reference in New Issue
Block a user