beta
大石头 authored at 2024-06-20 19:38:10 大石头 committed at 2024-06-20 19:38:25
808.00 B
AntJob
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using NewLife.Cube;
using NewLife.Log;

namespace AntJob.Web;

public class Program
{
    public static void Main(string[] args)
    {
        XTrace.UseConsole();

        var app = ApplicationManager.Load();
        do
        {
            app.Start(CreateHostBuilder(args).Build());
        } while (app.Restarting);
    }

    public static IHostBuilder CreateHostBuilder(String[] args)
    {
        return Host.CreateDefaultBuilder(args)
            .ConfigureLogging(logging => { logging.AddXLog(); })
            .ConfigureWebHostDefaults(webBuilder =>
            {
                //webBuilder.UseUrls("http://*:5000;https://*:5001");
                webBuilder.UseStartup<Startup>();
            });
    }
}