Skip to content

Instantly share code, notes, and snippets.

@thecodejunkie
Last active December 14, 2015 17:59
Show Gist options
  • Save thecodejunkie/5126044 to your computer and use it in GitHub Desktop.
Save thecodejunkie/5126044 to your computer and use it in GitHub Desktop.
public class IndexModule : NancyModule
{
public IndexModule()
{
Get["/"] = x => {
return "Nancy running on ScriptCS!";
};
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Nancy" version="0.16.1" targetFramework="net40" />
<package id="Nancy.Hosting.Self" version="0.16.1" targetFramework="net40" />
</packages>
#load "module.csx"
using System;
using Nancy;
using Nancy.Hosting.Self;
var nancyHost = new NancyHost(new Uri("http://localhost:8888/nancy/"));
nancyHost.Start();
Console.ReadKey();
nancyHost.Stop();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment