Created
April 23, 2019 01:18
-
-
Save dcomartin/dbc0ddb8c90361fb977a4ae311297344 to your computer and use it in GitHub Desktop.
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
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Options; | |
namespace Aws.DataProtection.Demo | |
{ | |
public class Startup | |
{ | |
private readonly IConfiguration _configuration; | |
public Startup(IConfiguration configuration) | |
{ | |
_configuration = configuration; | |
} | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.Configure<DemoConfig>(_configuration.GetSection("Config")); | |
services.AddDataProtection() | |
.PersistKeysToAWSSystemsManager("/Demo/DataProtection"); | |
} | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.Run(async (context) => | |
{ | |
await context.Response.WriteAsync("Hello World!"); | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment