Created
February 10, 2020 11:28
-
-
Save AbhinavPradeep/5e2b1faf2a2ad37fa5a04f405a606770 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.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Theta.Customers.API.Configuration; | |
namespace Theta.Customers.API | |
{ | |
public class Startup | |
{ | |
public IConfiguration Config { get; } | |
public Startup(IConfiguration config) | |
{ | |
this.Config = config; | |
} | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddOptions(); | |
services.AddMvc(); | |
services.Configure<CustomerSettings>(Config.GetSection("CustomerSettings")); | |
} | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.UseMvc(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment