mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-29 01:05:32 +00:00
Allow for setting a testuser via settings
This commit is contained in:
17
musenalm.go
17
musenalm.go
@@ -1,14 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/app"
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/helpers"
|
||||
_ "github.com/Theodor-Springmann-Stiftung/musenalm/migrations"
|
||||
"github.com/pocketbase/pocketbase/plugins/migratecmd"
|
||||
"log"
|
||||
)
|
||||
|
||||
const (
|
||||
DEV_CONFIG = "config.dev.json"
|
||||
DEFAULT_CONFIG = "config.json"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := app.New(app.Config{})
|
||||
|
||||
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)
|
||||
|
||||
migratecmd.MustRegister(app.PB, app.PB.RootCmd, migratecmd.Config{
|
||||
Automigrate: false,
|
||||
|
||||
Reference in New Issue
Block a user