feat: 实现减脂体重管理App完整功能
- 实现拍照识别食物功能(集成大语言模型视觉能力) - 实现智能对话功能(集成大语言模型流式输出) - 实现食物记录和卡路里管理功能 - 实现体重记录和统计功能 - 实现健康数据管理页面 - 配置数据库表结构(用户、食物记录、体重记录) - 实现Express后端API路由 - 配置Tab导航和前端页面 - 采用健康运动配色方案
This commit is contained in:
34
.cozeproj/scripts/prod_run.sh
Normal file
34
.cozeproj/scripts/prod_run.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
# 产物部署使用
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(pwd)"
|
||||
|
||||
HOST="${HOST:-0.0.0.0}"
|
||||
PORT="${PORT:-5000}"
|
||||
|
||||
# ==================== 工具函数 ====================
|
||||
info() {
|
||||
echo "[INFO] $1"
|
||||
}
|
||||
warn() {
|
||||
echo "[WARN] $1"
|
||||
}
|
||||
error() {
|
||||
echo "[ERROR] $1"
|
||||
exit 1
|
||||
}
|
||||
check_command() {
|
||||
if ! command -v "$1" &> /dev/null; then
|
||||
error "命令 $1 未找到,请先安装"
|
||||
fi
|
||||
}
|
||||
|
||||
# ============== 启动服务 ======================
|
||||
# 检查核心命令
|
||||
check_command "pnpm"
|
||||
check_command "npm"
|
||||
|
||||
info "开始执行:pnpm run start (server)"
|
||||
(pushd "$ROOT_DIR/server" > /dev/null && PORT="$PORT" pnpm run start; popd > /dev/null) || error "服务启动失败"
|
||||
info "服务启动完成!\n"
|
||||
Reference in New Issue
Block a user