I have built the frontend part with Next.js so that I can take advantage of SSR and better SEO. And I do have a custom NodeJS+express server for user management and other DB stuff(Fully working with Postman).
Now I want to integrate next.js with my custom-made NodeJS server, how do I do that there are not many resources available to properly execute this.
Please help me out with this not getting anything, how do I integrate them.
If I directly try to access the NodeJS API via URL, say http://localhost:4000/api/v1/register then next.js will throw CORS error, and how will HTTP cookie work? Or I will have to send the JWT token to frontend and save it into local storage and send it with Bearer token.