My question is: how do I generate the link (baseurl) so that my front-end accesses the data coming from that database (PostgreSQL) > Heroku ?
My PostgreSQL there from Heroku releases this information:
As img above I have host , database and etc., now I need to put some information like this here in that part of my front- / em> (Service) eventosUrl = '???';
to release the data coming from bd Heroku:
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable()
export class EventoService {
//eventosUrl = 'http://localhost:8080/eventos';
eventosUrl = '???';
constructor(private http: HttpClient) { }
listar() {
return this.http.get<any[]>(this.eventosUrl);
}
}
I do not know if I need to put something in my application.properties file since I locally put it to release access to the database via Ajax (requests):
ARCHIVE application.properties:
origem-permitida=http://localhost:4200