Update app top cater for env variables

This commit is contained in:
2024-07-11 15:58:55 +02:00
parent 1c7db86571
commit 4923f0f426
15 changed files with 42 additions and 50 deletions

View File

@@ -2,6 +2,7 @@ enum Enviroment { dev, prod }
abstract class AppEnviroment {
static late String baseApiUrl;
static late String baseFileUrl;
static late Enviroment _enviroment;
static Enviroment get enviroment => _enviroment;
static setupEnv(Enviroment env) {
@@ -9,12 +10,14 @@ abstract class AppEnviroment {
switch (env) {
case Enviroment.dev:
{
baseApiUrl = "http://localhost";
baseApiUrl = "http://localhost:80";
baseFileUrl = "http://localhost:9000";
break;
}
case Enviroment.prod:
{
baseApiUrl = "api";
baseFileUrl = "minio";
break;
}
}