A simple hello world OWIN + Gate + Firefly app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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