From a9719bf9d782ffb2529fe364a1780416be0a2b75 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Sat, 27 Jan 2024 19:16:53 -0500 Subject: removed exta uselss git clone line --- main.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 6e187cb..52d168d 100644 --- a/main.go +++ b/main.go @@ -116,14 +116,6 @@ func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) { } } -// func main() { -// app := pocketbase.New() - -// if err := app.Start(); err != nil { -// log.Fatal(err) -// } -// } - func defaultPublicDir() string { if strings.HasPrefix(os.Args[0], os.TempDir()) { return "./pb_public" @@ -244,13 +236,16 @@ func main() { app.OnAfterBootstrap().PreAdd(func(e *core.BootstrapEvent) error { app.Dao().ModelQueryTimeout = time.Duration(queryTimeout) * time.Second + return nil }) app.OnBeforeServe().Add(func(e *core.ServeEvent) error { e.Router.GET("/*", apis.StaticDirectoryHandler(os.DirFS(publicDir), indexFallback)) + return nil }) + if err := app.Start(); err != nil { log.Fatal(err) } -- cgit v1.2.3