Skip to content

Instantly share code, notes, and snippets.

@clofresh
Last active December 31, 2015 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clofresh/7965089 to your computer and use it in GitHub Desktop.
Save clofresh/7965089 to your computer and use it in GitHub Desktop.
using System;
using Nancy;
using Nancy.Hosting.Self;
namespace HelloNancy
{
public class HelloNancy : NancyModule
{
public HelloNancy ()
{
Get ["/hello/{name}"] = parameters => {
return "Yo, " + parameters["name"];
};
}
static void Main(string[] args)
{
using (var host = new NancyHost (new Uri ("http://localhost:8080"))) {
host.Start ();
Console.ReadLine ();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment