Mongodb & Nextjs: 404 Error, api/route.js is not found
I am using mongodb for my first time, I created a simple basic code that take a string input and store it in a database, but for some reason that didn’t work that easy as I expected, there is an error with the fetching path, I am giving it the path of the api so it can complete the saving process but the request is not send to the api, and of course I am sure that the path itself is right, this is the files structure:
app
api
route.js
page.jsx