import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class ApiService { server_route = 'http://localhost:3000' constructor(private http: HttpClient) { } getMessage() { return this.http.get( 'http://localhost:3000/api/message'); } postReplayUpload(file: any) { return this.http.post( this.server_route+'/api/upload-replay', file); } getSeasons() { return this.http.get( this.server_route+'/api/seasons'); } getSeasonDetails(id: number) { return this.http.get( this.server_route+'/api/seasons/'+id); } }