Files
soul/start-miniprogram.sh
v0 f3195d9331 refactor: overhaul homepage and app structure
Simplify homepage, show chapter counts, display directory, trim bottom nav, in-page match feature, move marketing content, and enhance "My" page.

#VERCEL_SKIP

Co-authored-by: undefined <undefined+undefined@users.noreply.github.com>
2026-01-14 05:10:32 +00:00

65 lines
1.6 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

#!/bin/bash
# Soul派对小程序 - 快速启动脚本
# 用于启动后端API服务器
echo "=================================="
echo " Soul派对·创业实验 启动脚本 "
echo "=================================="
echo ""
# 检查Node.js
if ! command -v node &> /dev/null; then
echo "❌ 错误: 未检测到Node.js请先安装Node.js"
exit 1
fi
echo "✅ Node.js版本: $(node -v)"
# 检查pnpm
if ! command -v pnpm &> /dev/null; then
echo "⚠️ 警告: 未检测到pnpm尝试使用npm..."
PACKAGE_MANAGER="npm"
else
echo "✅ pnpm版本: $(pnpm -v)"
PACKAGE_MANAGER="pnpm"
fi
echo ""
echo "1⃣ 检查依赖..."
# 检查是否已安装依赖
if [ ! -d "node_modules" ]; then
echo "📦 正在安装依赖..."
$PACKAGE_MANAGER install
if [ $? -ne 0 ]; then
echo "❌ 依赖安装失败"
exit 1
fi
else
echo "✅ 依赖已安装"
fi
echo ""
echo "2⃣ 启动后端API服务器..."
echo ""
echo "🚀 服务器将运行在: http://localhost:3000"
echo "📡 API接口地址: http://localhost:3000/api"
echo ""
echo "📱 小程序配置步骤:"
echo " 1. 打开微信开发者工具"
echo " 2. 导入项目,选择 miniprogram/ 目录"
echo " 3. 修改 miniprogram/app.js 中的 apiBase 为: http://localhost:3000/api"
echo " 4. 点击编译运行"
echo ""
echo "🔧 后台管理地址: http://localhost:3000/admin"
echo " 默认账号: admin / admin123"
echo ""
echo "=================================="
echo "按 Ctrl+C 停止服务器"
echo "=================================="
echo ""
# 启动开发服务器
$PACKAGE_MANAGER run dev