Skip to content

Instantly share code, notes, and snippets.

@carcer
Created September 20, 2012 14:00
Show Gist options
  • Save carcer/3756103 to your computer and use it in GitHub Desktop.
Save carcer/3756103 to your computer and use it in GitHub Desktop.
// /api/wut
public GetGuidesModule()
: base("/api")
{
Get["/wut"] = p =>
{
return "Hello";
};
}
// /api/export/something
public class GetGuidesModule : NancyModule
{
public GetGuidesModule()
: base("/api")
{
Get["/export/{type}"] = p =>
{
return "Hello " + p.type;
};
}
}
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/events-api/,~/api/" />
....
<add name="Nancy" verb="*" type="Nancy.Hosting.Aspnet.NancyHttpRequestHandler" path="api/*" />
// /api/anything-here
public class GetGuidesModule : NancyModule
{
public GetGuidesModule()
: base("/api")
{
Get["/{type}"] = p =>
{
return "Hello " + p.type;
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment