Skip to content

Instantly share code, notes, and snippets.

@jmarnold
Created September 18, 2012 04:32
Show Gist options
  • Save jmarnold/3741267 to your computer and use it in GitHub Desktop.
Save jmarnold/3741267 to your computer and use it in GitHub Desktop.
Sample twitter app
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
FubuApplication
.For(new FubuRegistry(x =>
{
x.Actions.IncludeClassesSuffixedWithController();
x.Routes.HomeIs<MyController>(c => c.get_something());
x.Services(s => s.ReplaceService(new OAuthSettings
{
ConsumerKey = "key",
ConsumerSecret = "secret"
}));
}))
.StructureMapObjectFactory()
.Bootstrap();
PackageRegistry.AssertNoFailures();
}
}
public class MyController
{
public HtmlDocument get_something()
{
var doc = new HtmlDocument();
doc.Add(new HtmlTag("h1").Text("Hello, {0}".ToFormat(FubuPrincipal.Current().Name)));
return doc;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment