Files
ArmedPolice/README.md
2021-11-23 09:38:59 +08:00

60 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## ArmedPolice 武警工单系统管理
武警工单系统是一个基于Golang开发的后台管理系统
#### 注意事项
* ***config.yaml*** 包含了项目的运行配置
* 执行 ***build_linux.sh***、***build_window.sh*** 即可编译对应的运行程序
* 数据存储,仅支持***mysql***、***sqlite***
* 在使用***mysql***作为存储引擎时,需要提前先创建好数据表,并在配置中填写相应的连接信息
* 在使用***sqlite***需要设置文件存储地址因使用了Find_In_Set此函数故暂不支持sqlite
* 已开启了rate限流请参考配置中进行更改
``` type
# 数据引擎
engine:
# 开启会输出sql日志
debug: true
# db_mode - mysql | sqlite
db_mode: mysql
```
* 缓存存储,仅支持***mysql***、***sqlite***
* 在使用***redis***时,在配置中填写相应的连接信息
``` type
# 数据引擎
cache:
# memory | redis
type: redis
```
### 项目目录
* ***json*** 配置管理,存放配置并项目运行加载
* ***log*** 日志管理
* ***doc*** api文档管理
### 项目启动
- Windows
- 在根目录执行双击ArmedPolice.exe
- 在控制台中执行./ArmedPolice.exe可携带参数启动参数-key=value(建议第二种)
- Linux
- 在根目录执行ArmedPolice可携带参数启动参数 -key=value
- 执行server.sh ***start***|***restart***|***stop***
``` type
servier.sh
# 替换为你自己的执行程序
APP_NAME=main
# 项目的路径(替换成项目的路径)
PROJECT_LOCATION=/home/www/SciencesServer
```
- 参数信息
- init=truefalse 项目第一次运行设置true会自动迁移数据表默认false
- config="" 配置文件存放地址,默认./config.yaml
- mode=debugrelease 版本信息默认release