这是一个基于 React + Node.js 的工具库管理系统,包含前端界面和后端 API 服务。项目主要功能包括待接入工具列表管理和自动接入任务管理。
tools_auto_web/
├── src/ # React 前端源码
├── public/ # 静态资源
├── server/ # Node.js 后端服务
├── package.json # 前端依赖配置
└── README.md # 项目说明
项目连接的数据库信息:
# 在项目根目录下执行
npm install
# 进入 server 目录
cd server
npm install
# 在 server 目录下
cd server
# 开发模式启动(推荐,支持热重载)
npm run dev
# 或者生产模式启动
npm start
后端服务将在 http://localhost:3001
启动
# 在项目根目录下
npm start
前端服务将在 http://localhost:3000
启动,并自动打开浏览器
如果项目配置了并发启动脚本,可以:
# 在项目根目录下
npm run dev
# 在项目根目录下
npm run build
构建完成后,会在项目根目录生成 build
文件夹,包含所有静态资源。
# 在 server 目录下
cd server
npm start
将 build
文件夹中的内容部署到 Web 服务器(如 Nginx、Apache)或 CDN。
{
"name": "tools-auto-pt",
"version": "0.1.0",
"proxy": "http://localhost:3001",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
}
{
"name": "tools-auto-pt-server",
"version": "1.0.0",
"main": "server.js",
"scripts": {
"start": "node server.js",
"dev": "nodemon server.js"
}
}
# 安装依赖
npm install
# 启动开发服务器
npm start
# 启动后端开发服务器(在 server 目录)
npm run dev
# 运行测试
npm test
# 构建生产版本
npm run build
# 启动生产服务器(后端)
npm start
端口被占用 ```bash
lsof -i :3000 lsof -i :3001
# 杀死进程 kill -9
2. **依赖安装失败**
```bash
# 清除缓存
npm cache clean --force
# 删除 node_modules 重新安装
rm -rf node_modules
npm install
待接入工具列表管理
自动接入任务管理
tools_info_search_task
- 待接入工具主表tools_info_search_task_detail
- 待接入工具详情表tools_auto_access_task
- 自动接入任务表如有问题,请联系项目维护人员。