Exemplo n.º 1
0
      static void Main() {

         var config = new HttpSelfHostConfiguration("http://*****:*****@"([a-z])([A-Z])", "$1-$2").ToLowerInvariant();

         config.MapCodeRoutes(typeof(Samples.Controllers.Api.ApiController));

         var server = new HttpSelfHostServer(config);

         server.OpenAsync().Wait();

         Console.WriteLine("Listening on " + config.BaseAddress);
         Console.ReadLine();
      }