temperature-alarm/backend/Api/Program.cs
2025-03-19 13:19:14 +01:00

16 lines
363 B
C#

using Api;
using Microsoft.AspNetCore;
using Microsoft.EntityFrameworkCore;
var app = WebHost.CreateDefaultBuilder(args)
.UseUrls("http://0.0.0.0:5000")
.UseStartup<Startup>()
.Build();
await using var scope = app.Services.CreateAsyncScope();
await using var db = scope.ServiceProvider.GetService<DBContext>();
await db.Database.MigrateAsync();
app.Run();