Last active
May 23, 2022 16:22
-
-
Save awswithdotnet/8a8db2588b75fa769f09259f29fd81f7 to your computer and use it in GitHub Desktop.
ssms Api Program Complete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = WebApplication.CreateBuilder(args); | |
builder.WebHost.ConfigureAppConfiguration( | |
c => { | |
c.AddSystemsManager(source =>{ | |
source.Path = "/testapp"; | |
source.ReloadAfter = | |
TimeSpan.FromMinutes(10); | |
}); | |
} | |
); | |
builder.Services.AddControllers(); | |
builder.Services.AddEndpointsApiExplorer(); | |
builder.Services.AddSwaggerGen(); | |
var app = builder.Build(); | |
if (app.Environment.IsDevelopment()) | |
{ | |
app.UseSwagger(); | |
app.UseSwaggerUI(); | |
} | |
app.UseHttpsRedirection(); | |
app.UseAuthorization(); | |
app.MapControllers(); | |
app.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment