I’m working on this project and after spending sometime learning more about express.js I noticed that the json object which is returned has html markup. Where does this come from? I though the response object would only show up in the developer console.
Your express-server does not return a json object but the file views/index.html. You will have to implement the “backend” logic in the app.js file, where it says:
Oh, did not understand from your first post that you’ve meant the /testing1 path, sry. The reason you get html is in the res.send() method. Use res.json() instead and it will work. Here is an article explaining the difference: res.send() vs. res.json(). Hope this helps.