ingredients = document.getElementById('ingredients').value;
const apiUrl = "http://127.0.0.1:8762/api/recipes/getrecipes/" + ingredients;
const response = await fetch(apiUrl);
var data = await response.json();
console.log(data);
Connecting Frontend to Backend • 1 min read
Description
Our code to get data from frontend to backend.