mirror of
https://github.com/fergalmoran/podnoms.git
synced 2025-12-22 09:18:08 +00:00
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
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.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using PodNoms.Api.Providers;
|
|
|
|
namespace PodNoms.Api {
|
|
public class Program {
|
|
static bool isDevelopment =
|
|
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == EnvironmentName.Development;
|
|
|
|
public static void Main(string[] args) {
|
|
var host = BuildWebHost(args).Build();
|
|
host.MigrateDatabase(isDevelopment);
|
|
host.Run();
|
|
}
|
|
public static IWebHostBuilder BuildWebHost(string[] args) =>
|
|
WebHost.CreateDefaultBuilder(args)
|
|
.UseStartup<Startup>()
|
|
.UseUrls("http://0.0.0.0:5000")
|
|
.UseKestrel(options => {
|
|
options.Limits.MaxRequestBodySize = 1073741824;
|
|
});
|
|
|
|
}
|
|
}
|