Skip to content

Instantly share code, notes, and snippets.

@khellang
Last active December 22, 2015 17:12
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khellang/6926c11697f40c2e8455 to your computer and use it in GitHub Desktop.
Save khellang/6926c11697f40c2e8455 to your computer and use it in GitHub Desktop.
scriptcs running a self-hosted OWIN application
#r Owin;
#r Microsoft.Owin.Hosting;
using Owin;
using Microsoft.Owin.Hosting;
var url = "http://localhost:8080";
using (WebApp.Start(url, Configure))
{
Console.WriteLine("Running at {0}...", url);
Console.ReadLine();
}
public static void Configure(IAppBuilder app)
{
app.UseWelcomePage();
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Owin.SelfHost" version="3.0.1" targetFramework="net45" />
</packages>
@khellang
Copy link
Author

khellang commented Aug 5, 2015

Just put these files in a folder and run scriptcs script.csx 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment