Files
image-suite-studio/start.command
T
2026-08-16 17:32:43 +08:00

25 lines
724 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
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/zsh
# 双击本文件,或在终端执行:./start.command
# 启动电商套图工作台后端(http://127.0.0.1:3300
cd "$(dirname "$0")"
if [[ ! -d server/.venv ]]; then
echo "未找到 server/.venv,正在创建并安装依赖…"
python3 -m venv server/.venv || exit 1
server/.venv/bin/pip install -q -r server/requirements.txt || exit 1
fi
if [[ ! -f .env ]]; then
echo "未找到 .env,已从 .env.example 复制,请填入 API Key 后再启动。"
cp .env.example .env
echo "按回车关闭…"
read -r
exit 1
fi
echo "启动中:http://127.0.0.1:3300 (插件保持默认后端地址即可)"
echo "按 Ctrl+C 可停止服务"
echo
exec server/.venv/bin/python server/main.py