mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 01:05:32 +00:00
First Page
This commit is contained in:
@@ -4,8 +4,10 @@ import (
|
||||
"log"
|
||||
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/app"
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/cmd"
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/helpers"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/migrations"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/pages"
|
||||
"github.com/pocketbase/pocketbase/plugins/migratecmd"
|
||||
)
|
||||
|
||||
@@ -15,20 +17,20 @@ const (
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
cfg := app.NewConfigProvider([]string{DEFAULT_CONFIG}, []string{DEV_CONFIG})
|
||||
if err := cfg.Read(); err != nil {
|
||||
helpers.Assert(err, "Error reading config")
|
||||
}
|
||||
|
||||
app := app.New(*cfg.Config)
|
||||
app.PB.RootCmd.AddCommand(cmd.AddResetPagesCommand(app.PB, &app))
|
||||
|
||||
migratecmd.MustRegister(app.PB, app.PB.RootCmd, migratecmd.Config{
|
||||
Automigrate: false,
|
||||
TemplateLang: migratecmd.TemplateLangGo,
|
||||
})
|
||||
|
||||
if err := app.PB.Start(); err != nil {
|
||||
if err := app.Serve(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user