update main() to netcoreapp2.0

This commit is contained in:
Collin M. Barrett 2017-10-15 16:40:31 -05:00
parent 1fbe06912e
commit 29fc3a10db

View file

@ -1,5 +1,5 @@
using System.IO;
using JetBrains.Annotations;
using JetBrains.Annotations;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
namespace FilterLists.Api
@ -10,13 +10,14 @@ public class Program
[UsedImplicitly]
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args)
{
return WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseUrls("http://localhost:5123")
.Build();
host.Run();
}
}
}