public static void Main(string[] args) { var host = new WebHostBuilder() .UseKestrel() .UseContentRoot(ContentRootLocator.GetContentRoot(args) ?? Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup <Startup>() .UseApplicationInsights() .Build(); if (Lynicon.Commands.CommandRunner.InterceptAndRunCommands(host.Services, args)) { return; } host.Run(); }
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => WebHost.CreateDefaultBuilder(args) .UseContentRoot(ContentRootLocator.GetContentRoot(args) ?? Directory.GetCurrentDirectory()) .UseStartup <Startup>();