diff --git a/.gitignore b/.gitignore index ecf8883..556feda 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .DS_Store networkDev node.txt -config.json +/config.json database.db logs 模板 \ No newline at end of file diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..a0b4059 --- /dev/null +++ b/config/config.json @@ -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 + } +} \ No newline at end of file