新增配置

master
smartwyy 6 months ago
parent 00536ce172
commit 6cf78d77ef

@ -7,9 +7,9 @@ public class CarServerMgr
{
public static CarServer? CarServer { get; set; }
public static void InitServer()
public static void InitServer(int port)
{
CarServer = AppInfo.Container.Resolve<CarServer>();
CarServer.Start(5588);
CarServer.Start(port);
}
}

@ -93,5 +93,6 @@ app.MapControllers();
AppInfo.Container = app.Services.GetAutofacRoot();
CarServerMgr.InitServer();
var listen = builder.Configuration.GetSection("Listen");
CarServerMgr.InitServer(int.Parse(listen.GetSection("Port").Value ?? "5588"));
app.Run();

@ -7,10 +7,10 @@
"Update": {
"AutoUpdate": "false",
"Version": "1.1.0.1",
"Url": "http://121.4.95.243:8090/Updates/AutoUpdaterStarter.xml"
"Url": "http://1:8090/Updates/AutoUpdaterStarter.xml"
},
"Redis": {
"Connection": "106.12.36.89:6379,password=123456",
"Connection": "1:6379,password=123456",
"InstanceName": "local",
"DefaultDB": "8"
},
@ -20,5 +20,8 @@
"Microsoft.AspNetCore": "Warning"
}
},
"Listen": {
"Port": 5588
},
"AllowedHosts": "*"
}

@ -7,10 +7,10 @@
"Update": {
"AutoUpdate": "false",
"Version": "1.1.0.1",
"Url": "http://121.4.95.243:8090/Updates/AutoUpdaterStarter.xml"
"Url": "http://1:8090/Updates/AutoUpdaterStarter.xml"
},
"Redis": {
"Connection": "106.12.36.89:6379,password=123456",
"Connection": "1:6379,password=123456",
"InstanceName": "local",
"DefaultDB": "8"
},
@ -20,5 +20,8 @@
"Microsoft.AspNetCore": "Warning"
}
},
"Listen": {
"Port": 5588
},
"AllowedHosts": "*"
}

Loading…
Cancel
Save