https://i.sstatic.net/xYWv0.png
I'm attempting to utilize the new App route feature in nextJs to call an API route. However, I keep getting a "not found" error. I have followed the structure as outlined in the documentation.
Why is my chat.js file not being called? Have I structured it incorrectly?
- List item
export default async function handler(req, res) {
const {message} = req.body;
try {
const response = await axios.post(
res.status(200).json(reply);
} catch (error) {
console.error(error);
res.status(500).json({error: "An error occurred while processing the request"});
}