What I ended up doing was creating a button on my client via HTML and JS client, which triggered the local node server, that then calls the API. Here is my client:
$(document).ready(function() {
let url = 'http://localhost:3000/';
$('button').on('click',function(e){
e.preventDefault();
let data = {
endPoint: url
};
$.ajax({
url: url,
method: 'POST',
data: data,
dataType: 'json'
}).done(function(response) {
console.log(response);
});
});
});
Ultimately you can trigger it with anything, but I made a button so I understood each step of the way :) Hope this helps!
Hi Arristoteles,
What I ended up doing was creating a button on my client via HTML and JS client, which triggered the local node server, that then calls the API. Here is my client:
Ultimately you can trigger it with anything, but I made a button so I understood each step of the way :) Hope this helps!
Thanks Liz..