summary refs log tree commit diff
path: root/extra/admin-api/Spacebar.CleanSettingsRows/Program.cs
blob: cb99a17aefcf8cdad0b9357ff57d82e3c24bfd75 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using Microsoft.EntityFrameworkCore;
using Spacebar.CleanSettingsRows;
using Spacebar.Db.Contexts;

var builder = Host.CreateApplicationBuilder(args);
builder.Services.AddHostedService<Worker>();

builder.Services.AddDbContextPool<SpacebarDbContext>(options => {
    options
        .UseNpgsql(builder.Configuration.GetConnectionString("Spacebar"))
        .EnableDetailedErrors();
});


var host = builder.Build();
host.Run();