Update README and project cleanup
This commit is contained in:
24
start.command
Executable file
24
start.command
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user