24 lines
450 B
C#
24 lines
450 B
C#
using Backend.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddDbContext<AppDbContext>(options =>
|
|
options.UseNpgsql(builder.Configuration.GetConnectionString("Postgres")));
|
|
|
|
// MARKER: CORS SERVICES
|
|
|
|
// MARKER: AUTH SERVICES
|
|
|
|
builder.Services.AddControllers();
|
|
|
|
var app = builder.Build();
|
|
|
|
// MARKER: CORS MIDDLEWARE
|
|
|
|
// MARKER: AUTH MIDDLEWARE
|
|
|
|
app.MapControllers();
|
|
|
|
app.Run();
|