返回提交历史
Modified
Server/HaloPixelToolBox.Server/Program.cs
+9
-2
XFEstudio/HaloPixelToolBox
添加配置文件初始化
2fd8379
代码差异
1 个文件
+9
-2
@@ -6,7 +6,7 @@ using XFEExtension.NetCore.ServerInteractive.Interfaces;
6
6
using XFEExtension.NetCore.ServerInteractive.Utilities.Extensions;
7
7
using XFEExtension.NetCore.ServerInteractive.Utilities.Server;
8
8
9
var bindingAddress = Environment.GetEnvironmentVariable("HALOPIXEL_SERVER_BINDING_URL") ?? ServerProfile.ServerBindingIpAddress;
9
SaveProfiles();
10
10
11
11
var server = XFEServerBuilder.CreateBuilder()
12
12
.UseXFEServer()
@@ -30,8 +30,15 @@ var server = XFEServerBuilder.CreateBuilder()
30
30
{
31
31
options.ServerCoreName = "HaloPixelToolBoxServer";
32
32
options.MainEntryPoint = "api";
33
options.BindIP(bindingAddress);
33
options.BindIP(ServerProfile.ServerBindingIpAddress);
34
34
}))
35
35
.Build();
36
36
37
37
await server.Start();
38
39
void SaveProfiles()
40
{
41
ServerProfile.SaveProfile();
42
UserDataProfile.SaveProfile();
43
MainDataProfile.SaveProfile();
44
}