Fix the missing default configuration

This commit is contained in:
2025-10-24 03:11:07 +08:00
parent 7feebbabc0
commit 9c26f25c0e
2 changed files with 43 additions and 1 deletions

2
.gitignore vendored
View File

@@ -1,7 +1,7 @@
.DS_Store .DS_Store
networkDev networkDev
node.txt node.txt
config.json /config.json
database.db database.db
logs logs
模板 模板

42
config/config.json Normal file
View File

@@ -0,0 +1,42 @@
{
"server": {
"host": "0.0.0.0",
"port": 8080,
"mode": "debug",
"dist": ""
},
"database": {
"type": "sqlite",
"mysql": {
"host": "localhost",
"port": 3306,
"username": "root",
"password": "password",
"database": "networkdev",
"charset": "utf8mb4",
"max_idle_conns": 10,
"max_open_conns": 100
},
"sqlite": {
"path": "./database.db"
}
},
"redis": {
"host": "localhost",
"port": 6379,
"password": "",
"db": 0
},
"log": {
"level": "info",
"file": "./logs/app.log",
"max_size": 100,
"max_backups": 5,
"max_age": 30
},
"security": {
"jwt_secret": "your-jwt-secret-key",
"encryption_key": "your-encryption-key",
"jwt_refresh_threshold_hours": 6
}
}