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(); var app = builder.Build();
if (app.Environment.IsDevelopment()) if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
{ {
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(c => app.UseSwaggerUI(c =>

View File

@ -1,41 +1,51 @@
{ {
"$schema": "http://json.schemastore.org/launchsettings.json", "$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": { "iisSettings": {
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "http://localhost:27409", "applicationUrl": "http://localhost:27409",
"sslPort": 44329 "sslPort": 44329
} }
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}, },
"https": { "profiles": {
"commandName": "Project", "http_Development": {
"dotnetRunMessages": true, "commandName": "Project",
"launchBrowser": true, "dotnetRunMessages": true,
"launchUrl": "swagger", "launchBrowser": true,
"applicationUrl": "https://localhost:7241;http://localhost:5247", "launchUrl": "swagger",
"environmentVariables": { "applicationUrl": "http://localhost:5247",
"ASPNETCORE_ENVIRONMENT": "Development" "environmentVariables": {
} "ASPNETCORE_ENVIRONMENT": "Development"
}, }
"IIS Express": { },
"commandName": "IISExpress", "http_Staging": {
"launchBrowser": true, "commandName": "Project",
"launchUrl": "swagger", "dotnetRunMessages": true,
"environmentVariables": { "launchBrowser": true,
"ASPNETCORE_ENVIRONMENT": "Development" "launchUrl": "swagger",
} "applicationUrl": "http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Staging"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7241;http://localhost:5247",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
} }
}
} }

View File

@ -1,8 +1,11 @@
{ {
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "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" "Microsoft.AspNetCore": "Warning"
} }
}, },
"AllowedHosts": "*", "AllowedHosts": "*"
"ConnectionStrings": {
"DefaultConnection": "Server=54.71.217.228,1433;Database=st-database;User=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
}
} }