Skip to content
Snippets Groups Projects
Commit d2f4cd3f authored by asqiir's avatar asqiir
Browse files

changed Program.cs

parent d49bcb09
Branches
No related tags found
No related merge requests found
......@@ -9,6 +9,8 @@ using ClientServer.Workers;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore;
namespace ClientServer
{
public class Program
......@@ -16,7 +18,7 @@ namespace ClientServer
public static void Main(string[] args)
{
var root = Directory.GetCurrentDirectory();
/*var root = Directory.GetCurrentDirectory();
Constants.rootDir = root;
var builder = new WebHostBuilder()
......@@ -34,7 +36,10 @@ namespace ClientServer
//http://localhost:5000 //see https://github.com/aspnet/KestrelHttpServer/issues/639
.Build();
*/
var builder = BuildWebHost(args);
if (AppConfiguration.IsSlave == false)
{
ReleaseWorker.NextRun(); //this is sync (because fast)
......@@ -52,7 +57,15 @@ namespace ClientServer
TestServerTraceLogWorker.Start();
}
host.Run();
builder.Run();
//host.Run();
}
public static IWebHost BuildWebHost(string[] args) {
return WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment