diff --git a/mocha-common b/mocha-common index 93e8630..4c5a4c3 160000 --- a/mocha-common +++ b/mocha-common @@ -1 +1 @@ -Subproject commit 93e86302679876c3b963de550e8a4d7ef386c3cf +Subproject commit 4c5a4c336ea30705dc6992039383de9b4bbffba5 diff --git a/mocha-dotnet/src/app/Mocha.Oms.Server/Program.cs b/mocha-dotnet/src/app/Mocha.Oms.Server/Program.cs index 762c0ca..f96d7d2 100644 --- a/mocha-dotnet/src/app/Mocha.Oms.Server/Program.cs +++ b/mocha-dotnet/src/app/Mocha.Oms.Server/Program.cs @@ -25,7 +25,20 @@ public class Program : WebApplication public Dictionary _Sessions = new Dictionary(); - protected override int DefaultPort => 4436; + protected override int DefaultPort + { + get + { + if (System.Environment.GetEnvironmentVariable("OMS_SERVERPORT") != null) + { + if (Int32.TryParse(System.Environment.GetEnvironmentVariable("OMS_SERVERPORT"), out int port)) + { + return port; + } + } + return 4436; + } + } public Program() {