Last active
August 29, 2015 14:20
-
-
Save nojaf/ad4ab2ea2155adc97f35 to your computer and use it in GitHub Desktop.
SledgehammerSheep - Project Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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