mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-22 23:22:27 -04:00
Host: Moving the default host to a subproject, Kyoo is now a library without host
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user