コード例 #1
0
ファイル: Program.cs プロジェクト: cydrith/ACE
 public static void Main(string[] args)
 {
     ServiceConfig.LoadServiceConfig();
     if (!string.IsNullOrWhiteSpace(ConfigManager.Config.ApiServer?.ListenUrl))
     {
         // Get the bind address and port from config:
         var server = WebApp.Start <Startup>(url: ConfigManager.Config.ApiServer.ListenUrl);
         Console.WriteLine($"ACE API listening at {ConfigManager.Config.ApiServer.ListenUrl}");
     }
     else
     {
         Console.WriteLine("There was an error in your API configuration.");
     }
     Console.ReadLine(); // need a readline or the error flashes without being seen
 }