import { HttpClient } from '@angular/common/http'; import { Injectable, inject } from '@angular/core'; import type { Observable } from 'rxjs'; import { environment } from '@/environments/environment'; export interface HealthResponse { status: string; } @Injectable({ providedIn: 'root' }) export class HealthService { private http = inject(HttpClient); check(): Observable { return this.http.get(`${environment.backendUrl}/health`); } }