Routing of react pages using express and passportjs for authentication
currently i am learning web dev and i have a doubt.
My express is running on port 3000 and react is running on port 3001, and i want to handle the routing using express.
I made an authentication system using passportjs and now i only want to allow a user to go to “http://localhost:3001/” if he is logged in. But i am confused, how can i achieve it? Because if i add a middleware in express, it will be for port 3000.