o erro: Access to XMLHttpRequest at 'https://api-pacientes.herokuapp.com/pacientes' from origin 'null' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains the invalid value 'null//undefined'.
var botaoAdicionar = document.querySelector("#buscar-pacientes");
botaoAdicionar.addEventListener("click", function() {
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://api-pacientes.herokuapp.com/pacientes");
xhr.addEventListener("load", function() {
console.log(xhr.responseText);
});
xhr.send();
});