I have recently begun migrating a project made with create-react-app to next.js, and I am not sure how I should migrate the backend of it.
I currently have an express server as my backend, but I see in next.js there are performance advantages by using serverless functions in the api
folder. My question is: am I better off migrating the express server to serverless functions or keeping it and using it with next.js? Also, is it a bad idea to use express in a serverless function?
I have looked at quite a few tutorials on next.js and many use express although the next.js docs recommend against this, so I'm not sure if I'm missing some advantage here.
[EDIT]: my backend basically consists of routes for getting/updating database content and uploading files, with JWT authentication middleware.