diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -34,16 +34,16 @@ func main() { } log.Printf("Storage directory: %s\n", storage.Path) - model.ConnectDatabase(filepath.Join(storage.Path, "ceres.sqlite3")) - defer model.DisconnectDatabase() - model.MigrateDatabase(version) + db := model.OpenDB(filepath.Join(storage.Path, "ceres.sqlite3")) + defer db.Close() + db.Migrate(version) if flags.examples { - model.InjectExampleRecipes() - log.Println("Added example recipes") + db.CreateExamples() + log.Println("Created example recipes") } - server := NewServer(config.HttpAddress) + server := NewServer(config.HttpAddress, db) go server.Start() defer server.Stop() |