实现灵活的进程管理模式,支持开发和生产环境切换: ## 新增功能 - 创建开发模式进程管理服务(dev-process.service.ts) - 使用 Node.js child_process 直接管理 Claude Code 进程 - 添加 USE_PM2 环境变量控制进程管理模式 ## 后端更改 - 新增 dev-process.service.ts:开发模式进程管理 - 更新 instance.service.ts:根据 USE_PM2 选择进程管理方式 - 更新 config:添加 usePM2 配置项 - 修复 TypeScript 类型错误 ## 配置更新 - backend/.env:设置 USE_PM2=false(开发模式) - .env.example:添加 USE_PM2 配置说明 ## 模式对比 **开发模式**(USE_PM2=false): - 使用 child_process 管理进程 - 不需要安装 PM2 - 简化的监控功能 - 适合本地开发 **生产模式**(USE_PM2=true): - 使用 PM2 管理进程 - 完整的监控和自动重启 - 需要安装 PM2 - 适合生产部署 ## 文档更新 - README.md:添加开发/生产模式对比说明 - 更新环境变量表格 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
15 lines
276 B
JSON
15 lines
276 B
JSON
{
|
|
"permissions": {
|
|
"allow": [
|
|
"Bash(npm install:*)",
|
|
"Bash(git init:*)",
|
|
"Bash(git add:*)",
|
|
"Bash(git commit:*)",
|
|
"Bash(git remote add:*)",
|
|
"Bash(git branch:*)",
|
|
"Bash(git push:*)",
|
|
"Bash(npm run typecheck:*)"
|
|
]
|
|
}
|
|
}
|