Created
June 14, 2011 03:49
-
-
Save kevinswiber/1024277 to your computer and use it in GitHub Desktop.
A simple NRack app [https://github.com/kevinswiber/NRack]
This file contains hidden or 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
using System; | |
using NRack.Auth; | |
using NRack.Configuration; | |
using NRack.Helpers; | |
namespace NRack.Example.AspNet | |
{ | |
public class Config : ConfigBase | |
{ | |
public override void Start() | |
{ | |
Use<CustomAuthHandler>() | |
.Run(new MyApp())); | |
} | |
} | |
} |
This file contains hidden or 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
using System.Collections.Generic; | |
using NRack.Helpers; | |
namespace NRack.Example.AspNet | |
{ | |
public class MyApp : ICallable | |
{ | |
public dynamic[] Call(IDictionary<string, dynamic> environment) | |
{ | |
return new dynamic[] { 200, new Hash{{"Content-Type", "text/html"}}, "<h1>Hello, World!</h1>"}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment