23 lines
684 B
C#
23 lines
684 B
C#
using Tesses;
|
|
using Tesses.WebServer;
|
|
namespace Tesses.WebServer.ConsoleApp
|
|
{
|
|
|
|
class MainClass
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
var ip=System.Net.IPAddress.Any;
|
|
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);
|
|
|
|
s.ListenAsync(System.Threading.CancellationToken.None).Wait();
|
|
}
|
|
}
|
|
}
|