init: MetonaToast v2.0.0 基线 — 已完成改进(模板抽象/constants拆分/测试增强)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# MetonaToast 本地开发服务器
|
||||
|
||||
echo "🍞 MetonaToast 开发服务器"
|
||||
echo "========================="
|
||||
|
||||
# 检查Python
|
||||
if command -v python3 &> /dev/null; then
|
||||
PYTHON=python3
|
||||
elif command -v python &> /dev/null; then
|
||||
PYTHON=python
|
||||
else
|
||||
echo "❌ 错误: 未找到Python"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PORT=${1:-3000}
|
||||
|
||||
echo "✅ Python: $($PYTHON --version 2>&1)"
|
||||
echo "🌐 启动服务器..."
|
||||
echo ""
|
||||
echo "📁 访问地址:"
|
||||
echo " http://localhost:$PORT/examples/demo.html"
|
||||
echo " http://localhost:$PORT/examples/index.html"
|
||||
echo ""
|
||||
echo "按 Ctrl+C 停止服务器"
|
||||
echo ""
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
$PYTHON -m http.server $PORT
|
||||
Reference in New Issue
Block a user