This commit is contained in:
66
Program.cs
Normal file
66
Program.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
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();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user