Should I run react app and express server on different ports?

Should I run react app and express server on different ports?
0.0 0

#1

Should I run my react app and my backend server(express) on different ports? Is it possible to run them on the same port and if so, how can I handle the GET requests, so that my API is not publicly accessible?

What is the best practice in these situations?