Host: Moving the default host to a subproject, Kyoo is now a library without host

This commit is contained in:
Zoe Roux
2021-08-30 13:43:54 +02:00
committed by Diabltica
parent acf87b2619
commit e338fc6b37
14 changed files with 94 additions and 34 deletions
+30
View File
@@ -0,0 +1,30 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace Kyoo.Host.Console
{
/// <summary>
/// Program entrypoint.
/// </summary>
public static class Program
{
/// <summary>
/// The string representation of the environment used in <see cref="IWebHostEnvironment"/>.
/// </summary>
#if DEBUG
private const string Environment = "Development";
#else
private const string Environment = "Production";
#endif
/// <summary>
/// Main function of the program
/// </summary>
/// <param name="args">Command line arguments</param>
public static Task Main(string[] args)
{
Application application = new(Environment);
return application.Start(args);
}
}
}