1
0

113/03/12

This commit is contained in:
2024-03-12 09:43:29 +08:00
parent d5e469b094
commit 634172304f
10 changed files with 143 additions and 4 deletions

View File

@@ -0,0 +1,29 @@
using HangfireExample.WebService.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddHangfire();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseAuthorization();
app.MapControllers();
app.UseHangfireDashboard(builder.Configuration);
app.Run();