tesses.webserver/Tesses.WebServer.Console/Program.cs

23 lines
684 B
C#
Raw Normal View History

2022-04-02 21:15:20 +00:00
using Tesses;
using Tesses.WebServer;
namespace Tesses.WebServer.ConsoleApp
2022-04-02 18:59:12 +00:00
{
class MainClass
{
public static void Main(string[] args)
{
var ip=System.Net.IPAddress.Any;
2022-04-02 21:15:20 +00:00
StaticServer static_server = new StaticServer(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyVideos));
MountableServer mountable = new MountableServer(static_server);
mountable.Mount("/api/",new DynamicServer());
HttpServerListener s = new HttpServerListener(new System.Net.IPEndPoint(ip, 24240),mountable);
2022-04-02 18:59:12 +00:00
s.ListenAsync(System.Threading.CancellationToken.None).Wait();
}
}
}