Created
August 2, 2019 00:19
-
-
Save CreedsCode/45e7c06ff66a723f40c4965fe579bd5f to your computer and use it in GitHub Desktop.
Asp.net deploy 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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Logging; | |
namespace Hello_ASP.NET | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var config = new ConfigurationBuilder() | |
.AddCommandLine(args) | |
.SetBasePath(Directory.GetCurrentDirectory()) | |
.Build(); | |
var host = new WebHostBuilder() | |
.UseKestrel() | |
.UseConfiguration(config) | |
.UseContentRoot(Directory.GetCurrentDirectory()) | |
.UseStartup<Startup>() | |
//.UseUrls("http://*:8080/") | |
.Build(); | |
host.Run(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment