using System.Collections.Generic; using Infrastructure.Application; using Infrastructure.Configuration; using Infrastructure.Extensions; using Infrastructure.Web.Hosting; using Microsoft.AspNetCore; namespace ApiGateway { public class Program { public static void Main(string[] args) { var host = Helper.Instance.GetLocalIP().ToString(); WebHost.CreateDefaultBuilder(args) .Run(new List { new EFConfigurationValue { Id = "openapi.title", Value= "web api" }, new EFConfigurationValue { Id = "openapi.version", Value= "1.0" }, new EFConfigurationValue { Id = "server.urls", Value= "https://*:44380;http://*:8080" }, new EFConfigurationValue { Id = "security:key", Value= "111111111111111111111111"}, new EFConfigurationValue { Id = "security:iv", Value= "11111111"}, new EFConfigurationValue { Id = "usercenter:key", Value= "123456"}, new EFConfigurationValue { Id = "usercenter:login", Value= $"http://{host}:8000/Account/Login"}, new EFConfigurationValue { Id = "usercenter:logout", Value= $"http://{host}:8000/Account/Logout"}, new EFConfigurationValue { Id = "usercenter:register", Value= $"http://{host}:8000/Account/Register"}, // new EFConfigurationValue { Id = "name", Value= "网关"}, new EFConfigurationValue { Id = "logo", Value= "/images/logo.png",Type= InputType.ImageUrl}, new EFConfigurationValue { Id = "copyright", Value= "Copyright © {now} Company. All rights reserved",Type= InputType.Html} }); } } }