I have created a Node.js server (no PhP) to handle my requests. All I did was create a variable to hold the parsed json file (the response). The file path is correct; I've checked and double-checked. I have also checked the JSON data itself. Nothing appears to be corrupt there. This is the same site as the one I used for my first question. Here's the full project on GitHub: https://github.com/YungLonk/Practice-Node-JS. I included a vanilla js file that I know works in this project for y'all to understand what exactly it's supposed to do: just un-comment my script tag in html and comment out the jquery api and the jquery code. Here's some code from my jquery requests:
$('#fav_button').on('click', function(e) { // listens for the faves button being clicked
$.ajax({ // opens the request
type: "GET",
url: "fav.json",
timeout: 100,
complete: function() {console.log(Response);}, // Every time, log the response to the console
success: function() { // If all goes well...
let $fav_item = ""; // create empty string...
const $list = JSON.parse(Response); // parse the json file...
$list.each(function() { // and loop through the file, appending each song, artist, and mood to the empty string
let $copy = $fav_tem; // copy the template
$copy.text($copy.text().replace('%title', $list.song));
$copy.text($copy.text().replace('%artist', $list.artist));
$copy.text($copy.text().replace('%mood', $list.mood));
$fav_item.append($copy);});
$('#faves_field').html($fav_item);}, // append the now-full string to the page
error: function() {$('#faves_field').html(ErrorEvent);}});}); // if it fails, post the error to the page
What am I missing?