优化访问路径,使用index.html作为默认页面

- 将 linear-workflow.html 重命名为 index.html
- 更新所有配置文件和文档中的引用
- 现在可以直接访问 http://127.0.0.1:5175/
- 添加端口占用检查和自动处理功能
- 简化用户访问体验
This commit is contained in:
KQL
2025-08-24 14:20:37 +08:00
parent e8fd104bf7
commit 6af4efbabc
7 changed files with 54 additions and 23 deletions

View File

@@ -22,6 +22,23 @@ else
exit 1
fi
# 检查端口是否被占用
PORT=5175
if lsof -Pi :$PORT -sTCP:LISTEN -t >/dev/null 2>&1; then
echo ""
echo "⚠️ 端口 $PORT 已被占用"
echo "正在尝试关闭占用端口的进程..."
# 获取占用端口的进程PID
PID=$(lsof -t -i:$PORT)
if [ ! -z "$PID" ]; then
echo "找到进程 PID: $PID"
kill -9 $PID 2>/dev/null
echo "✅ 已终止占用端口的进程"
sleep 1
fi
fi
echo ""
echo "正在安装依赖..."
npm install
@@ -31,7 +48,7 @@ echo "======================================"
echo "🚀 启动服务器..."
echo "======================================"
echo ""
echo "服务器地址: http://127.0.0.1:5175/linear-workflow.html"
echo "服务器地址: http://127.0.0.1:5175/"
echo "按 Ctrl+C 停止服务器"
echo ""