Recently, I started the process of migrating a project from create-react-app to next.js. However, I am facing uncertainty when it comes to migrating the backend of the project.
Currently, my backend is built with an express server. In next.js, there are performance advantages offered by using serverless functions in the api
folder. So, my main question is whether I should migrate the express server to serverless functions or stick with it and integrate it with next.js. Additionally, I'm unsure if using express within a serverless function is a good practice.
I've gone through several tutorials on next.js, and many of them utilize express even though it's not recommended in the official documentation. This leaves me wondering if there are any overlooked benefits to using express with next.js.
[EDIT]: The backend primarily includes routes for interacting with the database, as well as file uploads, all secured with JWT authentication middleware.