29 lines
785 B
C#
29 lines
785 B
C#
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;
|
||
|
||
HttpServerListener s = new HttpServerListener(new System.Net.IPEndPoint(ip, 24240),static_server);
|
||
|
||
|
||
|
||
s.ListenAsync(System.Threading.CancellationToken.None).Wait();
|
||
}
|
||
|
||
|
||
}
|
||
}
|