Trying to deploy full stack web app on Render, any tips?

Hi everyone,

I’m new to Render and I’m trying to deploy a full-stack web app that I previously hosted on Heroku. I’ve been following the documentation and trying various combinations, but I’m still having trouble getting my app to deploy. I would really appreciate it if someone could take a look and help me troubleshoot the issue.

Thanks in advance for any help or advice you can offer. I’m looking forward to being a part of this community!

Here is a link to the repository on GitHub:

Here is an example of what I’ve tried so far:

It looks like you’re using a static site for a full stack service that has a node backend and a vuejs frontend.

You should use a web service for that. That service runs the nodejs/express webserver that serves the static vuejs files.

In your dashboard create a new webservice and use the build script you already have (it builds the vuejs frontend),

1 Like

Hi Alex,

Thanks for reaching out.

As Bergur kindly suggested, it does seem you may be using the wrong service type.

In general terms - and this may not be specific to your project - a common pattern for what you’ve described would be to have the frontend app as a Static Site and the backend as a Web Service, using the Node Native Environment. So two services, both linked to the same repo with settings like (but amended to your required values):

A Web Service for the “backend”

  • Root Directory: “backend”
  • Build Command: “npm install; npm run build;” (some backends don’t need to be built - will depend on what you’ve built)
  • Start Command: “node server.js” (or whatever file within “backend” that starts your backend app)

A Static Site for the “frontend”

  • Root Directory: “frontend”
  • Build Command: “npm run build” (static sites auto-install dependencies)
  • Publish Directory: “public” (this is Create React Apps default build directory, amend as required for your own project/framework)

Hope that helps

Alan

2 Likes

Dear Bergur and Alan,

Thank you both so much for taking the time to respond to my question. I really appreciate your help.
Alan, your detailed and thorough explanation was exactly what I needed to solve the problem. Your kindness and willingness to go above and beyond to assist me is greatly appreciated.

Thank you again for your assistance.

Sincerely,
Alex

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.