67 lines
1.8 KiB
C#
67 lines
1.8 KiB
C#
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
namespace rockfishCore
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
BuildWebHost(args).Run();
|
|
}
|
|
|
|
public static IWebHost BuildWebHost(string[] args) =>
|
|
WebHost.CreateDefaultBuilder(args)
|
|
.UseUrls("http://*:5000")
|
|
.CaptureStartupErrors(true)
|
|
.UseSetting("detailedErrors", "true")
|
|
.UseKestrel()
|
|
.UseContentRoot(System.IO.Directory.GetCurrentDirectory())
|
|
.UseIISIntegration()
|
|
.UseStartup<Startup>()
|
|
.Build();
|
|
}
|
|
}
|
|
|
|
|
|
//OLD .netCORE 1.1 style
|
|
// using System;
|
|
// using System.Collections.Generic;
|
|
// using System.IO;
|
|
// using System.Linq;
|
|
// using System.Threading.Tasks;
|
|
// using Microsoft.AspNetCore.Builder;
|
|
|
|
// using Microsoft.AspNetCore;
|
|
// using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
|
|
|
// namespace rockfishCore
|
|
// {
|
|
// public class Program
|
|
// {
|
|
// public static void Main(string[] args)
|
|
// {
|
|
// BuildWebHost(args).Run();
|
|
|
|
// public static IWebHost BuildWebHost(string[] args) =>
|
|
// WebHost.CreateDefaultBuilder(args)
|
|
// .UseStartup<Startup>()
|
|
// .Build();
|
|
|
|
// // var host = new WebHostBuilder()
|
|
// // .UseUrls("http://*:5000")
|
|
// // .CaptureStartupErrors(true)
|
|
// // .UseSetting("detailedErrors", "true")
|
|
// // .UseKestrel()
|
|
// // .UseContentRoot(Directory.GetCurrentDirectory())
|
|
// // .UseIISIntegration()
|
|
// // .UseStartup<Startup>()
|
|
// // .Build();
|
|
|
|
// // host.Run();
|
|
// }
|
|
// }
|
|
// }
|