Skip to content

Commit

Permalink
Added check of build number at startup
Browse files Browse the repository at this point in the history
- Added note at the start of program starting as to what version of the program this is
  • Loading branch information
thomst08 committed Jan 20, 2024
1 parent f037e1c commit 0ff8b3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Requestrr.WebApi/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public Startup(IConfiguration configuration)
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
string? buildNumber = Configuration.GetValue<string>("BuildVersion");
Console.WriteLine($"Starting Requestrr - build {(string.IsNullOrWhiteSpace(buildNumber) ? "unknown" : buildNumber)}");

services.AddControllersWithViews();
services.AddHttpClient();

Expand Down
3 changes: 2 additions & 1 deletion Requestrr.WebApi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"Default": "Warning"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"BuildVersion": "development"
}

0 comments on commit 0ff8b3f

Please sign in to comment.