How to Deploy monolithic MERN application in App Platform

I have monolithic MERN application(Single GitLab Repository). I create app in DigitalOcean App-Platform(PRO PLAN - WEB Services). Now Deployed only react app part and its working well. My questions:

  1. When I’ll deploy backend (NodeJS) part, how I can run React and NodeJS together?
  2. How I can change my app service type(Static/Web Services/etc.) ?
  3. How I can change build/start scripts?
  4. How I can clear my app cache?
  5. How I can create alert when my app is down(not available)?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Jon Friesen
DigitalOcean Employee
DigitalOcean Employee badge
November 2, 2022

👋 @FriendlyTealShark

Great questions, hopefully I can get you going here. Before I dive into your questions, we have a couple great (short) pieces that talk about deploying mono-repos:

Okay now to answer your questions:

  1. These will be two separate components, so your React will be deployed as a component (presumably a static site) and your NodeJS backend will be a web service.
  2. Component types cannot be changed after creation. If a change is needed the existing component will need to be deleted and recreated.
  3. Both build and run commands can be set in the UI and App Spec
  4. We don’t explicitly support clearing static site caches. A force rebuild which will trigger a CDN cache clear upon deployment.
  5. This isn’t built into App Platform, but we do have a service that provides real-time uptime and latency alerts.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.