Skip to content

Instantly share code, notes, and snippets.

@alexandrebl
Last active April 13, 2018 16:59
Show Gist options
  • Select an option

  • Save alexandrebl/14f7226a94090e446265bcab6be6d20a to your computer and use it in GitHub Desktop.

Select an option

Save alexandrebl/14f7226a94090e446265bcab6be6d20a to your computer and use it in GitHub Desktop.
.Net Core 2.0 WebApi StartUp Code
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace CryptoCurrencyInfo {
public sealed class Startup {
public Startup(IConfiguration configuration) {
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services) {
services.AddMvc();
}
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