Report this

What is the reason for this report?

App platform how to deploy react app + nodejs server

Posted on September 8, 2022

Hello guys, i’m facing some problems during my deploy on digitalocean app platform.

i’ve created a react app wich contains a server folder, so i’ve configured the app like so:

  • yarn build as a build command
  • yarn pm2 serve build 8080 --spa (to serve the frontend)
  • yarn pm2 start server/app.js --exp-backoff-restart-delay=100 (to start the BE)

env variables for url: REACT_APP_SERVER_BASE_URL is equal to ${APP_URL}

i can see clearly the frontend, but the app doesnt work, he can’t make api requests to the BE (i see raw html if i hit the login endpoint)

i’m not an expert but i really need your help

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.