Permalink
Find file
07621a8 Jun 8, 2016
30 lines (26 sloc) 781 Bytes
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Mvc;
using Strathweb.RouteConventions.AspNetCore;
namespace Demo
{
public class Startup
{
public Startup(IHostingEnvironment env)
{}
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc(opt =>
{
opt.UseCentralRoutePrefix(new RouteAttribute("api/v{version}"));
});
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddDebug();
app.UseMvc();
}
}
}