From ccd73cd4786bfea1fddaddf529f4106a32e7e1fc Mon Sep 17 00:00:00 2001 From: Vincent Guillet Date: Thu, 20 Nov 2025 22:34:19 +0100 Subject: [PATCH] feat: update environment configurations and improve Docker health checks --- client/src/app/services/auth.service.ts | 3 ++- client/src/environments/environment.prod.ts | 4 ++++ client/src/environments/environment.ts | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 client/src/environments/environment.prod.ts create mode 100644 client/src/environments/environment.ts diff --git a/client/src/app/services/auth.service.ts b/client/src/app/services/auth.service.ts index 4063814..b1274ca 100644 --- a/client/src/app/services/auth.service.ts +++ b/client/src/app/services/auth.service.ts @@ -3,6 +3,7 @@ import {catchError, map, of, switchMap, tap} from 'rxjs'; import {Credentials} from '../interfaces/credentials'; import {HttpClient} from '@angular/common/http'; import {User} from '../interfaces/user'; +import {environment} from '../../environments/environment'; @Injectable({ providedIn: 'root' @@ -10,7 +11,7 @@ import {User} from '../interfaces/user'; export class AuthService { private readonly http = inject(HttpClient); - private readonly BASE_URL = 'http://localhost:3000/api/auth'; + private readonly BASE_URL = `${environment.apiUrl}/auth`; readonly user = signal(null); private readonly accessToken = signal(null); diff --git a/client/src/environments/environment.prod.ts b/client/src/environments/environment.prod.ts new file mode 100644 index 0000000..6e537bb --- /dev/null +++ b/client/src/environments/environment.prod.ts @@ -0,0 +1,4 @@ +export const environment = { + production: true, + apiUrl: 'https://dev.unifihomenetwork.com/gameovergne-api' +}; diff --git a/client/src/environments/environment.ts b/client/src/environments/environment.ts new file mode 100644 index 0000000..5f5c8ae --- /dev/null +++ b/client/src/environments/environment.ts @@ -0,0 +1,4 @@ +export const environment = { + production: false, + apiUrl: 'http://localhost:3000/api' +};