Can a console app host both an asp.net mvc website and asp.net web api? At the moment following boiler plate code hosts only web api. Need to figure out how to add MVC website to it.
class Program
{
static void Main(string[] args)
{
using (WebApp.Start<Startup>("http://localhost:8080"))
{
Console.Write("Server Running. Press any key to exit.."); Console.ReadKey();
}
}
}
public class Startup
{
public void Configuration(IAppBuilder app)
{
var config = new HttpConfiguration();
config.Routes.MapHttpRoute(name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } );
app.UseWebApi(config);
}
}