Tuesday, 12 February 2019

Port Issues deploying React/Express with PM2

So I created a react/express app and I'm ready to deploy it out to a personal server that I installed node and PM2 on. I'm able to get both to run in PM2 using seperate ports. The problem is, the front end is on a different port than the API is. When I make a call from the front-end, the port number for the front end is used, which results in a 404. I know I could code the calls to use a a port from an env file. I was wondering if there was some automated (or semi automated) way to do this instead? I don't have access to an NGINX server.

Submitted February 12, 2019 at 05:18PM by likwidsage

No comments:

Post a Comment