Internal API calls and communication between NextJS app and express server Internal API calls and communication between NextJS app and express server express express

Internal API calls and communication between NextJS app and express server


This is a common pattern to separate between api & renderer.

In order to secure your api end-point you will need to implement some kind of authorization, there is common lib for auturization in express, called passport, you can check the types, it supports most of the common methods.

I personally prefer the JWT way, because it allows to work with many instances of my server due to the fact that there are no user session on the server.