a
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user