Quote API working in Postman but not in browser

Hi, I just finished the Quote API freeform project. It all seems to be up and running fine when I send the requests to localhost:4001 on Postman, but when I go to localhost:4001 in the browser and see the pre-created Quote API website, nothing works.

When I click “get random quote” it returns “undefined - undefined”, when I click “get all quotes” it returns “Your request returned no quotes”. Is there some connection that I haven’t made?

If it’s helpful, here is all the code from my server.js:

const express = require(“express”);

const app = express();

const { quotes } = require("./data");

const { getRandomElement } = require("./utils");

const PORT = process.env.PORT || 4001;

app.listen(PORT, () => {

console.log(Listening on port ${PORT});


//GET random quote

app.get("/api/quotes/random", (req, res, next) => {



//GET all quotes or quotes filtered by person

app.get("/api/quotes", (req, res, next) => {

const person = req.query.person;

if (person) {

const newArray = quotes.filter((quote) => quote.person === person);


} else {




//POST new quote

app.post("/api/quotes", (req, res, next) => {

const quoteText = req.query.quote;

const quotePerson = req.query.person;

if (quoteText && quotePerson) {

const newQuote = req.query;



} else {

res.status(400).send("Include both quote text and a person");





In response part it should be:
res.send({ quotes: quotes });
or in first case:
res.send({ quotes: newArray });