Program.cs 611 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.IO;
  3. using Microsoft.AspNetCore.Hosting;
  4. using Microsoft.Extensions.Hosting;
  5. namespace gameapi
  6. {
  7. public class Program
  8. {
  9. public static void Main(string[] args)
  10. {
  11. CreateHostBuilder(args).Build().Run();
  12. }
  13. public static IHostBuilder CreateHostBuilder(string[] args) =>
  14. Host.CreateDefaultBuilder(args)
  15. .ConfigureWebHostDefaults(webBuilder =>
  16. {
  17. webBuilder.UseStartup<Startup>();
  18. webBuilder.UseWebRoot(Directory.GetCurrentDirectory() + "/../client");
  19. Console.WriteLine("Web root path: " + Directory.GetCurrentDirectory() + "/../client");
  20. });
  21. }
  22. }