Make listen port configurable
This commit is contained in:
parent
3dcc255965
commit
4c5c17799a
2 changed files with 14 additions and 6 deletions
|
@ -43,4 +43,9 @@ app.MapFallbackToPage("/Shared/FrontendSPA");
|
|||
|
||||
if (app.Environment.IsDevelopment()) app.UseViteDevMiddleware();
|
||||
|
||||
var instanceConfig = app.Configuration.GetSection("Instance");
|
||||
|
||||
app.Urls.Clear();
|
||||
app.Urls.Add($"http://{instanceConfig["WebDomain"]}:{instanceConfig["ListenPort"]}");
|
||||
|
||||
app.Run();
|
|
@ -1,11 +1,14 @@
|
|||
AllowedHosts=*
|
||||
|
||||
[Logging:LogLevel]
|
||||
Default=Information
|
||||
Microsoft.AspNetCore=Warning
|
||||
[Instance]
|
||||
ListenPort=3000
|
||||
WebDomain=shrimp.example.org
|
||||
AccountDomain=example.org
|
||||
|
||||
[Database]
|
||||
Host=localhost
|
||||
Database=iceshrimp
|
||||
Username=iceshrimp
|
||||
Password=iceshrimp
|
||||
Password=iceshrimp
|
||||
|
||||
[Logging:LogLevel]
|
||||
Default=Information
|
||||
Microsoft.AspNetCore=Warning
|
Loading…
Add table
Reference in a new issue