presence/presence_api/Program.cs

33 lines
484 B
C#
Raw Normal View History

2024-11-14 08:01:32 +00:00
using data.RemoteData.RemoteDataBase;
2024-11-11 10:42:08 +00:00
var builder = WebApplication.CreateBuilder(args);
2024-11-14 08:01:32 +00:00
builder.Services.AddControllers();
builder.Services.AddDbContext<RemoteDatabaseContext>();
2024-11-11 10:42:08 +00:00
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
2024-11-14 08:01:32 +00:00
builder.Services.ConfigurateGroup();
2024-11-11 10:42:08 +00:00
var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
2024-11-14 08:01:32 +00:00
app.MapControllers();
2024-11-11 10:42:08 +00:00
app.Run();