Gente, separei listagem-clientes.js na pasta VIEWS e clientes.js na pasta API. Codei diferente do professor mas gerei o memso resultado... A pergunta é, há algum risco em codar dessa forma?
Em listagem-clientes tenho o seguinte código:
function listaClientes(array){ array.forEach(cliente => { let $$= document.createElement.bind(document) let tbody = document.querySelector('tbody'); let tr = $$('tr'); let td1 = $$('td'); let td2 = $$('td');
    td1.textContent = cliente.cpf;
    td2.textContent = cliente.nome;
    tbody.appendChild(tr)
    tr.appendChild(td1);
    tr.appendChild(td2);  
});}
Em clientes.js tenho o seguinte código:
fetch('http://localhost:4000/clientes') .then(res => res.json()) .then( json => { return listaClientes(json);
})
.catch(error=>console.log(error));