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

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

By ggreenleaf
Hi,
I’ve built a MERN app and am using yarn as a package manager.
I’ve been able to get my backend running on my droplet using pm2 and it seems stable.
How do I then go about linking that running server.js process to my front-end?
I’ve purchased my domain on DreamHost and have the nameservers on DreamHost pointing to ns1.dreamhost.com , ns2.dreamhost.com , ns3.dreamhost.com and created the proper A records in my Droplet. I can go to the ip address where it’s being ran and I get a “Unauthorized: No access token found” error which makes sense as no user has logged in/is logged in.
I have my project folder that contains a ‘backend’ folder and ‘client’ folder on my Droplet. On my host machine during development, I’d simply cd into the backend and run yarn run dev and then cd into client and run yarn start to get up and running (client is localhost:3000 which has a proxy to localhost:5000 which the server is being ran on).
My initial thought was perhaps I yarn build in my client folder to get a production build and toss that on DreamHost as my frontend, and since I have the DNS pointing to DigitalOcean the api calls will run successfully??? I’m unsure as to how to go about this and there’s not that many resources online that go into this in-depth.
Thanks in advance for any help!
220b5e1380f8416db566e9737f7170
newdoaccount
b1ce657f03b24202bfb1e84d954a18
Rashwan
Rashwan
rozerin.yildiz
bffe20e2d092407798209addeb821c
hanz
Ban Alexandru
Alif