1 Star 1 Fork 0

Jerry/certimate

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 972 Bytes
一键复制 编辑 原始数据 按行查看 历史
usual2970 提交于 2024-09-10 18:01 +08:00 . fix missing tzdata
package main
import (
"log"
"os"
"strings"
"github.com/labstack/echo/v5"
"github.com/labstack/echo/v5/middleware"
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/plugins/migratecmd"
"certimate/internal/domains"
"certimate/internal/utils/app"
_ "certimate/migrations"
"certimate/ui"
_ "time/tzdata"
)
func main() {
app := app.GetApp()
isGoRun := strings.HasPrefix(os.Args[0], os.TempDir())
migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{
// enable auto creation of migration files when making collection changes in the Admin UI
// (the isGoRun check is to enable it only during development)
Automigrate: isGoRun,
})
domains.AddEvent()
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
domains.InitSchedule()
e.Router.GET(
"/*",
echo.StaticDirectoryHandler(ui.DistDirFS, false),
middleware.Gzip(),
)
return nil
})
if err := app.Start(); err != nil {
log.Fatal(err)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/JerryFox/certimate.git
[email protected]:JerryFox/certimate.git
JerryFox
certimate
certimate
feat/access_ui

搜索帮助