﻿using Owin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace SelfHostWebApi
{
    public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            app.Use<LoggingMiddleware>();
            var config = new HttpConfiguration();
            config.Routes.MapHttpRoute(
                name:"DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new {  id = RouteParameter.Optional }
                );
            app.UseWebApi(config);
        }
    }
}
