39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Logging;
|
|
using Webhooks.API.Infrastructure;
|
|
|
|
namespace Webhooks.API
|
|
{
|
|
public class Program
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
CreateWebHostBuilder(args).Build()
|
|
.MigrateDbContext<WebhooksContext>((_,__) => { })
|
|
.Run();
|
|
}
|
|
|
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
WebHost.CreateDefaultBuilder(args)
|
|
.UseStartup<Startup>()
|
|
.ConfigureAppConfiguration((builderContext, config) =>
|
|
{
|
|
config.AddEnvironmentVariables();
|
|
})
|
|
.ConfigureLogging((hostingContext, builder) =>
|
|
{
|
|
builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
|
|
builder.AddConsole();
|
|
builder.AddDebug();
|
|
builder.AddAzureWebAppDiagnostics();
|
|
});
|
|
}
|
|
}
|