sad-indigoS
Refine3y ago
9 replies
sad-indigo

API returning 404

I am testing the API feature in next js and it keeps giving me a 404 error.
My files are in the following dir: app/pages/api/hello.js
The following url: http://localhost:3000/api/hello

here is the code in my hello.js file:
export default function handler(req, res) {
res.status(200).json({ text: 'Hello' })
}


Thanks in advance!
Was this page helpful?