From 3a7b01e747b431ff86c7f64ecb37d7e895da6d2d Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Wed, 15 Nov 2017 22:01:51 -0600 Subject: [PATCH] Use command line args when configuring the server --- PlatformSamples/AspNetCoreMvc/Program.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/PlatformSamples/AspNetCoreMvc/Program.cs b/PlatformSamples/AspNetCoreMvc/Program.cs index c6632a9..ac9502b 100644 --- a/PlatformSamples/AspNetCoreMvc/Program.cs +++ b/PlatformSamples/AspNetCoreMvc/Program.cs @@ -12,14 +12,15 @@ namespace AspNetCoreMvc { public class Program { - public static void Main(string[] args) + public static void Main (string[] args) { - BuildWebHost(args).Run(); + BuildWebHost (args).Run (); } - public static IWebHost BuildWebHost(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup() - .Build(); + public static IWebHost BuildWebHost (string[] args) => + WebHost.CreateDefaultBuilder (args) + .UseConfiguration (new ConfigurationBuilder ().AddCommandLine (args).Build ()) + .UseStartup () + .Build (); } }