Hi @klaus.konstantino, if you have not already visited the Netlify Documentation link below, kindly do so in order to learn how to properly use Express with Netlify Functions. Make sure to read the netlify.toml configuration section for proper configuration.
Thanks for your response. I have gone through the documentation as it mentions that If you don’t wish to add the rewrite, you might have to change the configuration in your function to specify the functions path, such as api.use('/.netlify/functions/', router);
I have done the same with my expressJs app. I am still not able to understand what’s wrong with my code.
Hi @klaus.konstantino, thanks for the feedback. The way you have structured your application files and folders might be causing the problem.
I will share some resources below where it demonstrates a working example so that you can build upon that to structure your application.
I suggest you start with the base example. Once you get it working then you structure your files and folders accordingly
However, you seem to have over-complicated your setup. You’re exporting/importing a lot of stuff unnecessarily. It took me some time to figure out the structure of your repo and the routes, to get that URL. I’d suggest refactoring your codebase, to manage the routes better.
This is not a Netlify issue, but something you need to change in your code.