Server-Port konfigurierbar statt hardcoded
- Program.cs: Port aus Config lesen mit Fallback 19000 - appsettings.json: Port: 19000 als Default - ServerSettingsEndpoint: Port als erste Einstellung (mit Neustart-Hinweis)
This commit is contained in:
1 parent
bfd78278ab
commit
dc2709b3cd
3 files changed
+4
-1
No files matched your search
+2
-1
@@ -84,4 +84,5 @@ app.MapSharedEndpoints();
|
||||
app.MapAdminEndpoints();
|
||||
app.MapServerSettingsEndpoints();
|
||||
|
||||
app.Run("http://0.0.0.0:19000");
|
||||
var port = app.Configuration.GetValue<int>("Port", 19000);
|
||||
app.Run($"http://0.0.0.0:{port}");
|
||||
Reference in new issue
Block a user