MCPcopy Create free account
hub / github.com/OpenFunction/samples / Program

Class Program

functions/knative/hello-world-dotnet/Program.cs:20–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace helloworld
19{
20 public class Program
21 {
22 public static void Main(string[] args)
23 {
24 CreateHostBuilder(args).Build().Run();
25 }
26
27 public static IHostBuilder CreateHostBuilder(string[] args)
28 {
29 string port = Environment.GetEnvironmentVariable("PORT") ?? "8080";
30 string url = String.Concat("http://0.0.0.0:", port);
31
32 return Host.CreateDefaultBuilder(args)
33 .ConfigureWebHostDefaults(webBuilder =>
34 {
35 webBuilder.UseStartup<Startup>().UseUrls(url);
36 });
37 }
38 }
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected