Skip to content

Commit

Permalink
create indexes and initalize cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Yucked committed Nov 19, 2023
1 parent 30bc490 commit f8088d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
.AddSingleton(new
MongoClient(builder.Configuration["Mongo"])
.GetDatabase(nameof(Grimoire)))
.AddSingleton<CacheHandler>()
.AddSingleton<DbHandler>()
.AddSingleton<DatabaseHandler>()
.AddHttpClient();

var app = builder.Build();
Expand All @@ -42,4 +41,8 @@
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");

await app
.Services
.GetRequiredService<DatabaseHandler>()
.InitializeAsync();
await app.RunAsync();

0 comments on commit f8088d2

Please sign in to comment.