Fix errors on prod

This commit is contained in:
Reimar 2025-03-19 14:06:56 +01:00
parent 3ffd8d23a0
commit 9b2b65a152
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268

View File

@ -12,17 +12,21 @@ class Program
app.Run();
}
// Calls the startup class and creates the webinterface
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseUrls("0.0.0.0:5000")
.UseUrls("http://0.0.0.0:5000")
.UseStartup<Startup>();
public static async void RunMigrations(IWebHost app)
{
await using var scope = app.Services.CreateAsyncScope();
await using var db = scope.ServiceProvider.GetService<DbContext>();
await db.Database.MigrateAsync();
if (db != null) {
await db.Database.MigrateAsync();
}
}
}