]> git.deb.at Git - rhonda/impostor.git/commitdiff
Allow no config and set default values
authorAeonLucid <aeonlucid@gmail.com>
Fri, 25 Sep 2020 23:19:32 +0000 (01:19 +0200)
committerAeonLucid <aeonlucid@gmail.com>
Fri, 25 Sep 2020 23:19:32 +0000 (01:19 +0200)
README.md
src/Impostor.Server/Data/ServerConfig.cs
src/Impostor.Server/Program.cs

index 9fd3378d2578a1dd590f8aea8e4b93d90e3a3152..63d9cc9ce239cebae4b56d4054e36d3a9b9c3f40 100644 (file)
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ Almost all standard features are implemented at this moment, except for public g
 - [x] Create game
 - [x] Join game
 - [x] Start game
-- [ ] Find game
+- [x] Find game
 - [x] V1 GameCodes (AAAA)
 - [x] V2 GameCodes (AAAAAA)
 - [x] Kick player
index ff7de585987d95933b9b8d1aed72bf9740ff398d..007b5edf69a66609c9846370cbcb5c0c53d1a7d4 100644 (file)
@@ -2,9 +2,9 @@
 {
     public class ServerConfig
     {
-        public string PublicIp { get; set; }
-        public ushort PublicPort { get; set; }
-        public string ListenIp { get; set; }
-        public ushort ListenPort { get; set; }
+        public string PublicIp { get; set; } = "127.0.0.1";
+        public ushort PublicPort { get; set; } = 22023;
+        public string ListenIp { get; set; } = "127.0.0.1";
+        public ushort ListenPort { get; set; } = 22023;
     }
 }
\ No newline at end of file
index 8cf882634f2a093b81ed01edec2b79153ad308a8..2cc7f0c1ff4afa4e82f0a7bec2374aa103e09810 100644 (file)
@@ -47,7 +47,7 @@ namespace Impostor.Server
             Host.CreateDefaultBuilder(args)
                 .ConfigureAppConfiguration(builder =>
                 {
-                    builder.AddJsonFile("config.json", false);
+                    builder.AddJsonFile("config.json", true);
                     builder.AddEnvironmentVariables(prefix: "IMPOSTOR_");
                     builder.AddCommandLine(args);
                 })