mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
初始化
This commit is contained in:
31
cmd/edge-admin/main.go
Normal file
31
cmd/edge-admin/main.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/apps"
|
||||
teaconst "github.com/TeaOSLab/EdgeAdmin/internal/const"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web"
|
||||
"github.com/iwind/TeaGo"
|
||||
_ "github.com/iwind/TeaGo/bootstrap"
|
||||
"github.com/iwind/TeaGo/rands"
|
||||
"github.com/iwind/TeaGo/sessions"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := apps.NewAppCmd().
|
||||
Version(teaconst.Version).
|
||||
Product(teaconst.ProductName).
|
||||
Usage(teaconst.ProcessName + " [-v|start|stop|restart]")
|
||||
|
||||
app.Run(func() {
|
||||
// 启动管理界面
|
||||
server := TeaGo.NewServer(false).
|
||||
AccessLog(false).
|
||||
EndAll().
|
||||
|
||||
Session(sessions.NewFileSessionManager(
|
||||
86400,
|
||||
rands.String(32),
|
||||
))
|
||||
server.Start()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user