阶段性提交

This commit is contained in:
GoEdgeLab
2020-07-22 22:19:39 +08:00
parent cc971be504
commit b984b68089
143 changed files with 22667 additions and 37 deletions

View File

@@ -5,6 +5,7 @@ import (
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
_ "github.com/TeaOSLab/EdgeAdmin/internal/web"
"github.com/iwind/TeaGo"
"github.com/iwind/TeaGo/Tea"
_ "github.com/iwind/TeaGo/bootstrap"
"github.com/iwind/TeaGo/rands"
"github.com/iwind/TeaGo/sessions"
@@ -18,14 +19,18 @@ func main() {
app.Run(func() {
// 启动管理界面
secret := rands.String(32)
// 测试环境下设置一个固定的key方便我们调试
if Tea.IsTesting() {
secret = "8f983f4d69b83aaa0d74b21a212f6967"
}
server := TeaGo.NewServer(false).
AccessLog(false).
EndAll().
Session(sessions.NewFileSessionManager(
86400,
rands.String(32),
))
Session(sessions.NewFileSessionManager(86400, secret))
server.Start()
})
}