mirror of
https://github.com/ryzij/ServerMonitor.git
synced 2026-07-14 03:46:58 +00:00
First commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using MonitorAgent.Core.Abstraction;
|
||||
using MonitorAgent.Application.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
|
||||
builder.Services.AddOpenApi();
|
||||
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddScoped<IMonitorService, MonitorService>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.MapOpenApi();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.UseSwagger().UseSwaggerUI();
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user