Files
onion-dmp/start.command
2026-04-08 14:52:09 +08:00

25 lines
496 B
Bash
Executable File
Raw Permalink 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/bash
cd "$(dirname "$0")"
echo "[DMP] 正在启动系统..."
if ! command -v node &> /dev/null
then
echo "[ERROR] 未找到 Node.js请从 https://nodejs.org 安装"
exit
fi
if [ ! -d "node_modules" ]; then
echo "[DMP] 正在安装依赖..."
npm install
fi
if [ ! -f "dmp_onion.db" ]; then
echo "[DMP] 正在初始化演示数据库..."
node db/seed.js
node db/seed_openai.js
fi
echo "[DMP] 启动服务器..."
open "http://localhost:3456"
node server.js