2022-12-14 18:09:41 +00:00
|
|
|
|
using Tesses;
|
|
|
|
|
using Tesses.WebServer;
|
|
|
|
|
using Tesses.VirtualFilesystem;
|
|
|
|
|
using Tesses.VirtualFilesystem.Filesystems;
|
|
|
|
|
namespace Tesses.WebServer.ConsoleApp
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
class MainClass
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var ip=System.Net.IPAddress.Any;
|
|
|
|
|
var lfs=new LocalFileSystem().GetSubdirFilesystem(Special.CurDir / "files");
|
|
|
|
|
|
|
|
|
|
StaticServer static_server = new StaticServer(lfs,true);
|
|
|
|
|
static_server.AllowUpload=true;
|
2023-06-08 19:04:59 +00:00
|
|
|
|
static_server.RedirectToRootInsteadOfNotFound = true;
|
2022-12-14 18:09:41 +00:00
|
|
|
|
|
|
|
|
|
HttpServerListener s = new HttpServerListener(new System.Net.IPEndPoint(ip, 24240),static_server);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
s.ListenAsync(System.Threading.CancellationToken.None).Wait();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|