All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.Program.cs Maven / Gradle / Ivy

There is a newer version: 2.2.197
Show newest version
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;

namespace dotnet_example
{
    public class Program
    {
        public static void Main(string[] args)
        {
           var config = new ConfigurationBuilder()
                .AddCommandLine(args)
                .AddEnvironmentVariables(prefix: "ASPNETCORE_")
                .Build();

            var host = new WebHostBuilder()
                .UseConfiguration(config)
                .UseKestrel()
                .UseContentRoot(Directory.GetCurrentDirectory())
                .UseUrls("http://0.0.0.0:5000")
                .UseIISIntegration()
                .UseStartup()
                .Build();

            host.Run();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy