]> git.deb.at Git - rhonda/impostor.git/commitdiff
Environment changes
authorAeonLucid <aeonlucid@gmail.com>
Wed, 30 Sep 2020 22:53:12 +0000 (00:53 +0200)
committerAeonLucid <aeonlucid@gmail.com>
Wed, 30 Sep 2020 22:53:12 +0000 (00:53 +0200)
src/Impostor.Server/Program.cs

index dfd57754b34a512b700352f662c5ef74d303991e..2dfded5e5eddfb2bd4ba8d23af1733142e71a918 100644 (file)
@@ -47,6 +47,11 @@ namespace Impostor.Server
         
         private static IHostBuilder CreateHostBuilder(string[] args) =>
             Host.CreateDefaultBuilder(args)
+#if DEBUG
+                .UseEnvironment(Environment.GetEnvironmentVariable("IMPOSTOR_ENV") ?? "Development")
+#else
+                .UseEnvironment("Production")
+#endif
                 .ConfigureAppConfiguration(builder =>
                 {
                     builder.AddJsonFile("config.json", true);