You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
656 B

function boards() {
const paragraph = document.createElement("p");
paragraph.innerHTML=getBoards();
console.log("Calling the boards function......");
return paragraph;
}
function getBoards() {
const responseText="";
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://localhost:3000/api/boards/", true);
xhr.setRequestHeader("Access-Control-Allow-Origin", "https://localhost:3000/")
xhr.onload = function() {
console.log(xhr.responseText);
};
xhr.send();
console.log("Calling the getBoards function......");
console.log("Returning response text: $responseText");
return responseText;
}
3 months ago
export { boards }