2021-11-24 03:40:30 +02:00
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
using Microsoft.Extensions.Hosting;
|
2022-01-22 00:48:34 +02:00
|
|
|
using System.Diagnostics;
|
|
|
|
using System.IO;
|
2021-11-24 03:40:30 +02:00
|
|
|
|
|
|
|
namespace NDB.Test.Api
|
|
|
|
{
|
|
|
|
public class Program
|
|
|
|
{
|
|
|
|
public static void Main(string[] args)
|
|
|
|
{
|
2022-01-22 00:48:34 +02:00
|
|
|
var pathToExe = Process.GetCurrentProcess().MainModule.FileName;
|
|
|
|
var pathToContentRoot = Path.GetDirectoryName(pathToExe);
|
|
|
|
Directory.SetCurrentDirectory(pathToContentRoot);
|
|
|
|
|
2021-11-24 03:40:30 +02:00
|
|
|
CreateHostBuilder(args).Build().Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
|
|
|
Host.CreateDefaultBuilder(args)
|
|
|
|
.ConfigureWebHostDefaults(webBuilder =>
|
|
|
|
{
|
|
|
|
webBuilder.UseStartup<Startup>();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|