
archetype-resources.Program.cs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dotnet-example-archetype
Show all versions of dotnet-example-archetype
Creates a new dotnet example
The 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 - 2025 Weber Informatics LLC | Privacy Policy