import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root', }) export class CodeExecutionService { private apiUrl = 'http://localhost:3000'; // Url du serveur Node.js en local constructor(private http: HttpClient) {} executeCode(code: string): Observable { return this.http.post(this.apiUrl, { code }); } }