Adjust settings for connecting to multiple databases

This commit is contained in:
Jorge Burgos 2025-02-05 21:54:18 -05:00
parent ea93e32194
commit e880749ca8
5 changed files with 68 additions and 47 deletions

View File

@ -35,7 +35,7 @@ builder.Services.AddScoped<IBudgetConfigDefaultSettingService, BudgetConfigDefau
var app = builder.Build();
if (app.Environment.IsDevelopment())
if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
{
app.UseSwagger();
app.UseSwaggerUI(c =>

View File

@ -9,7 +9,7 @@
}
},
"profiles": {
"http": {
"http_Development": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
@ -19,6 +19,16 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"http_Staging": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Staging"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,

View File

@ -4,5 +4,8 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"DefaultConnection": "Server=54.71.217.228,1433;Database=st_dev_database;User=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
}
}

View File

@ -0,0 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"DefaultConnection": "Server=54.71.217.228,1433;Database=st-database;User=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
}
}

View File

@ -5,8 +5,5 @@
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Server=54.71.217.228,1433;Database=st-database;User=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
}
"AllowedHosts": "*"
}