Use command line args when configuring the server
This commit is contained in:
parent
b67e87d19e
commit
3a7b01e747
|
@ -12,14 +12,15 @@ namespace AspNetCoreMvc
|
||||||
{
|
{
|
||||||
public class Program
|
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) =>
|
public static IWebHost BuildWebHost (string[] args) =>
|
||||||
WebHost.CreateDefaultBuilder(args)
|
WebHost.CreateDefaultBuilder (args)
|
||||||
.UseStartup<Startup>()
|
.UseConfiguration (new ConfigurationBuilder ().AddCommandLine (args).Build ())
|
||||||
.Build();
|
.UseStartup<Startup> ()
|
||||||
|
.Build ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue