change appsetting production
parent
bb63cbab02
commit
2c56d41c03
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
"ConnectionStrings": {
|
||||
"Postgres": "User ID=postgres;Password=root;Host=localhost;Port=5432;Database=iGarsonDB;",
|
||||
"PostgresServer": "Host=pg-0;port=5432;Username=macsuser;Password=tDKUWlcm01iSh0O12oPqnVX1kwHQlAPks9qNC;Database=DocuMedDB",
|
||||
"
|
||||
"PostgresServer": "Host=pg-0;port=5432;Username=macsuser;Password=tDKUWlcm01iSh0O12oPqnVX1kwHQlAPks9qNC;Database=DocuMedDB"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
public static class Address
|
||||
{
|
||||
public const string BaseAddress = "http://localhost:32770/api";
|
||||
public const string AuthController = $"{BaseAddress}/auth";
|
||||
public const string CityController = $"{BaseAddress}/city";
|
||||
public const string UniversityController = $"{BaseAddress}/university";
|
||||
public const string SectionController = $"{BaseAddress}/section";
|
||||
public const string UserController = $"{BaseAddress}/user";
|
||||
public const string MedicalHistoryTemplateController = $"{BaseAddress}/medicalhistory/template";
|
||||
public const string MedicalHistoryController = $"{BaseAddress}/medicalhistory";
|
||||
public static string BaseAddress = "http://localhost:32770/api";
|
||||
public static readonly string AuthController = $"{BaseAddress}/auth";
|
||||
public static readonly string CityController = $"{BaseAddress}/city";
|
||||
public static readonly string UniversityController = $"{BaseAddress}/university";
|
||||
public static readonly string SectionController = $"{BaseAddress}/section";
|
||||
public static readonly string UserController = $"{BaseAddress}/user";
|
||||
public static readonly string MedicalHistoryTemplateController = $"{BaseAddress}/medicalhistory/template";
|
||||
public static readonly string MedicalHistoryController = $"{BaseAddress}/medicalhistory";
|
||||
}
|
|
@ -9,9 +9,17 @@ builder.Services.AddMudServices(config =>
|
|||
config.SnackbarConfiguration.SnackbarVariant = Variant.Filled;
|
||||
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomRight;
|
||||
});
|
||||
|
||||
if (builder.HostEnvironment.IsDevelopment())
|
||||
{
|
||||
Address.BaseAddress = "http://localhost:32770/api";
|
||||
}
|
||||
else if (builder.HostEnvironment.IsProduction())
|
||||
{
|
||||
Address.BaseAddress = "https://documed.ir/api";
|
||||
}
|
||||
builder.Services.AddScoped<IRestWrapper, RestWrapper>();
|
||||
builder.Services.AddScoped<IUserUtility, UserUtility>();
|
||||
builder.Services.AddBlazoredLocalStorage();
|
||||
builder.Services.AddPWAUpdater();
|
||||
await builder.Build().RunAsync();
|
||||
var app = builder.Build();
|
||||
await app.RunAsync();
|
||||
|
|
Loading…
Reference in New Issue