FileSqlServerSync/Server/LocalServer/Program.cs

27 lines
601 B
C#
Raw Normal View History

using LocalServer;
var builder = WebApplication.CreateBuilder(args);
2024-06-21 04:32:55 +00:00
// Add services to the container.
2024-06-21 04:32:55 +00:00
builder.Services.AddControllers();
2024-06-21 04:32:55 +00:00
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddSingleton<LocalSyncServerFactory>();
2024-06-21 04:32:55 +00:00
var app = builder.Build();
2024-06-21 04:32:55 +00:00
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseWebSockets();
app.UseAuthorization();
2024-06-21 04:32:55 +00:00
app.MapControllers();
2024-06-21 04:32:55 +00:00
app.Run();