✨ add jwt / complete the rotation verification
This commit is contained in:
12
main.go
12
main.go
@@ -9,18 +9,18 @@ import (
|
||||
|
||||
func main() {
|
||||
// 初始化配置
|
||||
core.InitConfig()
|
||||
core.InitLogger()
|
||||
core.InitGorm()
|
||||
core.InitCaptcha()
|
||||
core.InitRedis()
|
||||
core.InitConfig() // 读取配置文件
|
||||
core.InitLogger() // 初始化日志
|
||||
core.InitGorm() // 初始化数据库
|
||||
core.InitRedis() // 初始化redis
|
||||
core.InitCaptcha() // 初始化验证码
|
||||
// 命令行参数绑定
|
||||
option := cmd.Parse()
|
||||
if cmd.IsStopWeb(&option) {
|
||||
cmd.SwitchOption(&option)
|
||||
return
|
||||
}
|
||||
r := router.InitRouter()
|
||||
r := router.InitRouter() // 初始化路由
|
||||
addr := global.CONFIG.System.Addr()
|
||||
global.LOG.Info("Server run on ", addr)
|
||||
err := r.Run(addr)
|
||||
|
Reference in New Issue
Block a user