Skip to content

Instantly share code, notes, and snippets.

@nojaf
Last active August 29, 2015 14:20
Show Gist options
  • Save nojaf/ad4ab2ea2155adc97f35 to your computer and use it in GitHub Desktop.
Save nojaf/ad4ab2ea2155adc97f35 to your computer and use it in GitHub Desktop.
SledgehammerSheep - Project Setup
using System;
using System.Diagnostics;
using Microsoft.Owin.Hosting;
namespace SledgehammerSheep
{
public class Program
{
static void Main(string[] args)
{
string baseAddress = "http://localhost:7891/";
// Start OWIN host
using (WebApp.Start<Startup>(baseAddress))
{
Process.Start(baseAddress); // Launch the browser.
Console.WriteLine("Press Enter to exit...");
Console.ReadLine();
}
Console.ReadLine();
}
}
}
using Microsoft.Owin;
using Microsoft.Owin.FileSystems;
using Microsoft.Owin.StaticFiles;
using Owin;
using SledgehammerSheep;
[assembly: OwinStartup(typeof(Startup))]
namespace SledgehammerSheep
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
FileServerOptions fileServerOptions = new FileServerOptions()
{
RequestPath = PathString.Empty,
FileSystem = new PhysicalFileSystem(@".\website"),
};
app.UseFileServer(fileServerOptions);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment