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.

Revisions

  1. CreedsCode created this gist Aug 2, 2019.
    35 changes: 35 additions & 0 deletions Program.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    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();
    }

    }
    }