Skip to content

Commit

Permalink
update db connection env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
juuwel committed May 27, 2024
1 parent d98f9a0 commit 7a2c6b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static async Task<WebApplication> StartApi(string[] args)
var connectionString = builder.Configuration.GetConnectionString("BotaniqueDb");
builder.Services.AddDbContextFactory<ApplicationDbContext>(options =>
{
connectionString ??= Environment.GetEnvironmentVariable("BotaniqueDb");
connectionString ??= Environment.GetEnvironmentVariable("DbConnection");
options.UseNpgsql(connectionString ?? throw new Exception("Connection string cannot be null"));
});
}
Expand Down

0 comments on commit 7a2c6b9

Please sign in to comment.