Регистрация | Вход
public class Name : WebServer.Controller { public string method() // url = localhost/name/methood { return "Name\\Method controller"; } } class Program { static void Main(string[] args) { var ws = new WebServer(); ws.AddAction(req => { Console.WriteLine($"raw req: {req.req}"); // console log req }); ws.AddPattern("/", req => "hello webserver!"); // localhost ws.AddController<Name>(); //localhost/name/methood ws.UseFile(); // localhost/www/index.html ws.Start(); Console.ReadKey(); }