mirror of
				https://github.com/Theodor-Springmann-Stiftung/musenalm.git
				synced 2025-10-31 10:15:32 +00:00 
			
		
		
		
	First Page
This commit is contained in:
		
							
								
								
									
										36
									
								
								;
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								;
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| package main | ||||
|  | ||||
| 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" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	DEV_CONFIG     = "config.dev.json" | ||||
| 	DEFAULT_CONFIG = "config.json" | ||||
| ) | ||||
|  | ||||
| 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.Serve(); err != nil { | ||||
| 		log.Fatal(err) | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Simon Martens
					Simon Martens