Change hosting to external IP

This commit is contained in:
Fergal Moran
2018-03-27 18:39:43 +01:00
parent 14185071d7
commit 3c77bd08f2
3 changed files with 15 additions and 14 deletions

View File

@@ -14,19 +14,20 @@ namespace PodNoms.Api {
static bool isDevelopment =
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == EnvironmentName.Development;
public static void Main (string[] args) {
CreateWebHostBuilder (args).Build ().Run ();
public static void Main(string[] args) {
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder (string[] args) =>
WebHost.CreateDefaultBuilder (args)
.UseStartup<Startup> ();
// .UseKestrel(options => {
// options.Listen(IPAddress.Any, 5000);
// if (isDevelopment){
// options.Listen(IPAddress.Any, 5001, listenOptions => {
// listenOptions.UseHttps("certs/dev2.podnoms.com.pfx", "secret");
// });
// }
// });
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseUrls("http://0.0.0.0:5000");
// .UseKestrel(options => {
// options.Listen(IPAddress.Any, 5000);
// if (isDevelopment){
// options.Listen(IPAddress.Any, 5001, listenOptions => {
// listenOptions.UseHttps("certs/dev2.podnoms.com.pfx", "secret");
// });
// }
// });
}
}