Files
Ubuntu 32b43f85bd a
2026-07-03 16:58:28 +08:00

27 lines
658 B
Bash
Executable File

#!/bin/bash
# 录音服务启动脚本
echo "🎙️ 启动录音服务..."
# 创建上传目录
mkdir -p /home/ubuntu/nanocode/audio-recorder/uploads
# 进入后端目录
cd /home/ubuntu/nanocode/audio-recorder/backend
# 检查依赖
if ! python3 -c "import flask" 2>/dev/null; then
echo "📦 安装依赖..."
pip3 install -r requirements.txt -q
fi
# 启动服务
echo "🌐 服务启动在 http://0.0.0.0:8890"
echo "📱 手机浏览器访问: http://$(hostname -I | awk '{print $1}'):8890"
echo ""
echo "⚠️ 注意:手机浏览器需要 HTTPS 才能录音"
echo " 建议用 nginx 反向代理 + SSL 证书"
echo ""
python3 app.py