docs: 添加部署文档和 README
- 新增 DEPLOY.md 详细部署指南 - 新增 README.md 项目说明 - 更新 .env.example 添加 JWT_SECRET 示例 - 优化 db.js 数据库连接配置(支持端口和超时设置)
This commit is contained in:
@@ -3,3 +3,4 @@ DB_HOST=localhost
|
||||
DB_USER=root
|
||||
DB_PASSWORD=your_password_here
|
||||
DB_NAME=api_debug
|
||||
JWT_SECRET=your_jwt_secret_key_here
|
||||
|
||||
@@ -6,9 +6,13 @@ const pool = mysql.createPool({
|
||||
user: process.env.DB_USER || 'root',
|
||||
password: process.env.DB_PASSWORD || '',
|
||||
database: process.env.DB_NAME || 'api_debug',
|
||||
port: process.env.DB_PORT || 3306,
|
||||
waitForConnections: true,
|
||||
connectionLimit: 10,
|
||||
queueLimit: 0
|
||||
queueLimit: 0,
|
||||
connectTimeout: 10000,
|
||||
acquireTimeout: 10000,
|
||||
timeout: 10000
|
||||
});
|
||||
|
||||
module.exports = pool;
|
||||
|
||||
Reference in New Issue
Block a user