If you read through routes/tests.js, you can see what exactly we're doing:
const https = require('https');
require('dotenv').config();
https.get(`https://api.edamam.com/search?app_id=${process.env.APPLICATION_ID}&app_key=${process.env.APPLICATION_KEY}&q=cheesecake`, (res) => {
console.log("Got response: " + res.statusCode)
res.setEncoding('utf8')
res.on("data", (chunk) => {
console.log(chunk)
})
}).on('error', (e) => {
console.log("Got error: " + e.message);
})
Our fetch call is hardcoded to search cheesecake (my favorite dessert… ask me for my recipe) and if we run it with node routes/tests.js, we'll see a bunch of JSON returned in the console. If you have any problems, be sure to check your API key.