1 Star 0 Fork 1.1K

倪瑜/BookStack

forked from 进击的皇虫/BookStack 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 924 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"fmt"
"os"
"github.com/TruthHun/BookStack/utils"
"github.com/astaxie/beego"
"github.com/TruthHun/BookStack/commands"
"github.com/TruthHun/BookStack/commands/daemon"
_ "github.com/TruthHun/BookStack/routers"
_ "github.com/go-sql-driver/mysql"
"github.com/kardianos/service"
)
func main() {
// https://beego.me/docs/mvc/controller/config.md#app-%E9%85%8D%E7%BD%AE
beego.BConfig.MaxMemory = 1 << 26 * 1024 // 设置最大内存,64GB
if len(os.Args) >= 3 && os.Args[1] == "service" {
if os.Args[2] == "install" {
daemon.Install()
} else if os.Args[2] == "remove" {
daemon.Uninstall()
} else if os.Args[2] == "restart" {
daemon.Restart()
}
}
commands.RegisterCommand()
d := daemon.NewDaemon()
s, err := service.New(d, d.Config())
if err != nil {
fmt.Println("Create service error => ", err)
os.Exit(1)
}
utils.PrintInfo()
utils.InitVirtualRoot()
s.Run()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/hndais/BookStack.git
git@gitee.com:hndais/BookStack.git
hndais
BookStack
BookStack
master

搜索帮助