26 lines
502 B
Batchfile
26 lines
502 B
Batchfile
@echo off
|
||
echo [DMP] 正在启动系统...
|
||
echo [DMP] 检查环境...
|
||
where node >nul 2>nul
|
||
if %errorlevel% neq 0 (
|
||
echo [ERROR] 未找到 Node.js,请先安装 Node.js!
|
||
pause
|
||
exit /b
|
||
)
|
||
|
||
if not exist "node_modules" (
|
||
echo [DMP] 正在安装依赖...
|
||
call npm install
|
||
)
|
||
|
||
if not exist "dmp_onion.db" (
|
||
echo [DMP] 正在初始化演示数据库...
|
||
node db/seed.js
|
||
node db/seed_openai.js
|
||
)
|
||
|
||
echo [DMP] 启动服务器...
|
||
start "" http://localhost:3456
|
||
node server.js
|
||
pause
|