forked from Kispi/Core
Simon Giesel
be3f71eb12
All checks were successful
continuous-integration/drone/push Build is passing
22 lines
500 B
Go
22 lines
500 B
Go
package main
|
|
|
|
import (
|
|
"cliffbreak.de/hgoe-sas-server/pkg/middlewares"
|
|
"cliffbreak.de/hgoe-sas-server/pkg/utils"
|
|
"github.com/pocketbase/pocketbase"
|
|
"github.com/pterm/pterm"
|
|
)
|
|
|
|
func main() {
|
|
pterm.Info.Println("Loading environment variables...")
|
|
utils.LoadEnv()
|
|
pterm.Info.Println("Starting PocketBase server...")
|
|
app := pocketbase.New()
|
|
|
|
app.OnBeforeServe().Add(middlewares.ServeSPA(utils.GetEnv("WEBAPP", "./webapp")))
|
|
|
|
if err := app.Start(); err != nil {
|
|
pterm.Fatal.Println(err)
|
|
}
|
|
|
|
}
|