34 lines
621 B
C#
34 lines
621 B
C#
using System;
|
|
using appsrv.server;
|
|
using appsrv.protocol;
|
|
using System.Threading;
|
|
using appsrv.resources;
|
|
using System.IO;
|
|
using appsrv.test;
|
|
|
|
namespace appsrv
|
|
{
|
|
class MainClass
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
ApplicationServer server = new ApplicationServer();
|
|
|
|
Resource root = new DirectoryResource(new DirectoryInfo("./www"));
|
|
server.AddRoot("localhost",root);
|
|
|
|
StaticClassResource staticClassResource = new StaticClassResource(typeof(StaticTest),root);
|
|
|
|
|
|
Http http = new Http(server);
|
|
|
|
http.Start();
|
|
|
|
Thread.Sleep(10000);
|
|
|
|
http.Stop();
|
|
|
|
}
|
|
}
|
|
}
|