# dnf-server **Repository Path**: take-to/dnf-server ## Basic Information - **Project Name**: dnf-server - **Description**: dnf-server - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-27 - **Last Updated**: 2024-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: DNF ## README # dnf-server ## 技术栈 - go - gorm - gin ## 配置介绍 - host:主机地址 - port:端口 - user:用户名 - password:密码 ```json { "api": { "cors": true }, "auth": { "realm": "test zone", "secret": "f450a7bdbde3416d22474b9fdc2a3636", "id_key": "username", "timeout": 43200, "max_refresh": 3600 }, "game_db": { "enable": true, "mysql": [ { "key": "d_taiwan", "user": "game", "password": "123456", "host": "10.0.0.111", "port": 3306, "db": "d_taiwan", "charset": "utf8", "timeout": 5, "multi_statements": false, "debug": false }, { "key": "taiwan_cain", "user": "game", "password": "123456", "host": "10.0.0.111", "port": 3306, "db": "taiwan_cain", "charset": "utf8", "timeout": 5, "multi_statements": false, "debug": false }, { "key": "taiwan_cain_2nd", "user": "game", "password": "123456", "host": "10.0.0.111", "port": 3306, "db": "taiwan_cain_2nd", "charset": "utf8", "timeout": 5, "multi_statements": false, "debug": false }, { "key": "taiwan_billing", "user": "game", "password": "123456", "host": "10.0.0.111", "port": 3306, "db": "taiwan_billing", "charset": "utf8", "timeout": 5, "multi_statements": false, "debug": false }, { "key": "taiwan_login", "user": "game", "password": "123456", "host": "10.0.0.111", "port": 3306, "db": "taiwan_login", "charset": "utf8", "timeout": 5, "multi_statements": false, "debug": false } ] }, "service": { "pid_file": "server.pid", "daemon_log": "daemon.log" } } ``` ## 源码编译 ### 环境要求 go 1.18.10 ### 编译命令 ```sh # 运行 go run main.go -x # 编译 go build main.go ``` ## 使用 ```sh # 初始化 ./main -i # 前台运行 ./main -x # 启动 deamon 服务 ./main -k start # 停止 deamon 服务 ./main -k stop ## windows # windows 安装服务 main.exe -k install # windows 卸妆服务 main.exe -k uninstall ``` ## 数据库对照表 https://bbs.aladedalu.com/thread-3143-1-1.html