-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram.cs
More file actions
executable file
·37 lines (34 loc) · 883 Bytes
/
Program.cs
File metadata and controls
executable file
·37 lines (34 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
namespace QAware.OSS
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseUrls(GetServerUrls(args))
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
private static string[] GetServerUrls(string[] args)
{
List<string> urls = new List<string>();
for (int i = 0; i < args.Length; i++)
{
if ("--server.urls".Equals(args[i], StringComparison.OrdinalIgnoreCase))
{
urls.Add(args[i + 1]);
}
}
return urls.ToArray();
}
}
}