I am trying to create a really simple NancyFx project using OWIN hosting.
Nancy appears to be running because I get the 404 that comes with Nancy by default, but none of my modules are ever reached.
Here is what I have so far. It is probably something really obvious.
Startup.cs
public class Startup
{
public void Configuration(IAppBuilder builder)
{
builder.UseNancy();
}
}
Program.cs
class Program
{
static void Main(string[] args)
{
using (WebApplication.Start<Startup>("http://+:8080"))
{
Console.WriteLine("Press enter to exit");
Console.ReadLine();
}
}
}
HelloWorld.cs
class HelloWorld : Nancy.NancyModule
{
public HelloWorld()
{
Get["/"] = parameters =>
{
return "Hello World!";
};
}
}
Thanks for the help in advance!
You need to make your module public, right now it's private
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With