Skip to content

Instantly share code, notes, and snippets.

@CreedsCode
Created August 2, 2019 00:19
Show Gist options
  • Save CreedsCode/45e7c06ff66a723f40c4965fe579bd5f to your computer and use it in GitHub Desktop.
Save CreedsCode/45e7c06ff66a723f40c4965fe579bd5f to your computer and use it in GitHub Desktop.
Asp.net deploy setup
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