Skip to content

mattjamieson/tinyhttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyHttp - a tiny C# HTTP server

Copyright (C) 2012 Matt Jamieson

public class Program : RequestProcessor
{
    public Program()
    {
        Get["/"] = s => new HtmlResponse("<h1>Welcome</h1>");
        Get["/hello/{name}"] = s => new HtmlResponse(String.Format("<h1>Hello, {0}</h1>", s.name));
    }

    public static void Main()
    {
        var host = new TinyHttpHost("http://localhost:9999/", new Program());
        host.Start();

        while (true) ;
    }
}

About

A tiny C# HTTP server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages