初步实现安装界面

This commit is contained in:
刘祥超
2020-10-13 20:05:29 +08:00
parent cd1738b4da
commit f30059c623
37 changed files with 1207 additions and 56 deletions

View File

@@ -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().