Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/DevBetterWeb.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
// 29 Aug 2023 - Getting a nullref in here somewhere maybe? Also a stack overflow during startup somewhere.

var builder = WebApplication.CreateBuilder(args);
var port = Environment.GetEnvironmentVariable("PORT") ?? "8080";

Console.WriteLine($"Startup ENV: {builder.Environment.EnvironmentName}");
var isProduction = builder.Environment.IsEnvironment("Production");
bool isDevelopment = builder.Environment.IsDevelopment();
Expand Down Expand Up @@ -167,7 +169,7 @@


var app = builder.Build();

app.Urls.Add($"http://*:{port}");
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
Expand Down
Loading