mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
初步实现安装界面
This commit is contained in:
@@ -7,8 +7,11 @@ import (
|
||||
"github.com/iwind/TeaGo"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
_ "github.com/iwind/TeaGo/bootstrap"
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"github.com/iwind/TeaGo/rands"
|
||||
"github.com/iwind/TeaGo/sessions"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -26,6 +29,16 @@ func main() {
|
||||
secret = "8f983f4d69b83aaa0d74b21a212f6967"
|
||||
}
|
||||
|
||||
// 启动API节点
|
||||
_, err := os.Stat(Tea.Root + "/edge-api/configs/api.yaml")
|
||||
if err == nil {
|
||||
logs.Println("start edge-api")
|
||||
err = exec.Command(Tea.Root + "/edge-api/bin/edge-api").Start()
|
||||
if err != nil {
|
||||
logs.Println("[ERROR]start edge-api failed: " + err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
server := TeaGo.NewServer(false).
|
||||
AccessLog(false).
|
||||
EndAll().
|
||||
|
||||
Reference in New Issue
Block a user