Skip to content

Commit

Permalink
add server host arg
Browse files Browse the repository at this point in the history
  • Loading branch information
supermomonga committed Jun 25, 2023
1 parent 2b69eac commit da94374
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MoEmbed.App/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public static void Main(string[] args)
.AddEnvironmentVariables()
.Build();
var serverport = config.GetValue<int?>("port") ?? 5000;
var serverurls = $"http://*:{ serverport }";
var serverhost = config.GetValue<string?>("host") ?? "*";

Check warning on line 24 in MoEmbed.App/Program.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 24 in MoEmbed.App/Program.cs

View workflow job for this annotation

GitHub Actions / build

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
var serverurls = $"http://{serverhost}:{ serverport }";

return Host.CreateDefaultBuilder(args)
.ConfigureLogging(logging => {
Expand Down

0 comments on commit da94374

Please sign in to comment.