Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Created March 14, 2012 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aaronpowell/2032972 to your computer and use it in GitHub Desktop.
Save aaronpowell/2032972 to your computer and use it in GitHub Desktop.
A simple hello world OWIN + Gate + Firefly app
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
var builder = new AppBuilder();
var app = builder.Build(Startup.Configuration);
var server = new ServerFactory().Create(app, 1337);
Console.WriteLine("Running on localhost:1337");
Console.ReadKey();
}
}
public class Startup
{
public static void Configuration(IAppBuilder builder)
{
builder
.RunDirect((req, res) =>
{
res.Status = "200 OK";
res.ContentType = "text/plain";
res.Write("Hello World!\r\n").End();
});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment