public void Configuration(IAppBuilder app) { HttpConfiguration config = new HttpConfiguration(); config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; config.EnableSystemDiagnosticsTracing(); config.Formatters.Clear(); config.Formatters.Add(new ServiceStackTextFormatter()); config.EnableCors(); app.MapStatic("/ui", "ui"); app.MapStatic("/scripts", "scripts"); app.MapStatic("/bower_components", "bower_components"); app.Use<RedirectMiddleware>(); config.MapHttpAttributeRoutes(); app.UseWebApi(config); }
public void Configuration(IAppBuilder appBuilder) { appBuilder.MapStatic("/content") .UseStatic(ContentPath("Index.html")) .MapStatic("/css", ContentPath("css")) .MapStatic("/js", ContentPath("js")) .MapStatic("/font-awesome", ContentPath("font-awesome")) .UseStatic(new StaticSettings("..\\..\\Content\\"){Cached = true}) .UseErrorPage(); }