37 lines
846 B
C#
37 lines
846 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace ReallifeGamemode.DataService
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
BuildWebHost(args).Run();
|
|
}
|
|
|
|
public static IWebHost BuildWebHost(string[] args)
|
|
{
|
|
return WebHost.CreateDefaultBuilder(args)
|
|
.ConfigureLogging((ctx, l) =>
|
|
{
|
|
l.AddLog4Net(Path.Combine(ctx.HostingEnvironment.ContentRootPath, "log4net.config"));
|
|
})
|
|
.UseStartup<Startup>()
|
|
.UseKestrel(k =>
|
|
{
|
|
k.Listen(IPAddress.Any, 5000);
|
|
})
|
|
.Build();
|
|
}
|
|
}
|
|
}
|