r/reactjs • • 2d ago

Needs Help Web Application Hosting (React)

Hello. Does anyone know how to host a web application built with React—both the frontend and the backend?

0 Upvotes

14 comments sorted by

1

u/ashikonweb 2d ago

vercel supports both backend frontend specially Next JS, JS stacked projects. Netlify supports the front hosting very well. Its depends which stack you used in backend.

1

u/antonkad-dev 1d ago

Easiest is one app: have the backend serve the React build as static files, so you deploy a single thing. Or host the frontend as static files and point it at the API URL you set at build time.
I maintain kad.dev, so I'm biased. You connect the repo and it detects the framework, builds and runs it, with a managed Postgres if your backend needs one. You can try it without creating an account.

1

u/Vincent_CWS 1d ago

openship selfhost?

1

u/TouristInfinite1635 15h ago

What are you using for the backend? Node/Express, Python, something else?

If it's a Node backend, one of the simplest approaches is to have it serve your built React frontend alongside your API. That way you're deploying one application instead of managing two separate services.

If you share a little more about your stack (and whether you're using a database), I can help you figure out the simplest way to deploy it.

1

u/MyVoiceIsElevating 2d ago

I use Firebase App Hosting if using Next.js. But more often I use Vite and use Firebase Hosting. Even have a few projects with React Vite deployed on Hosting with a Firebase Function (Cloud Run) running server side part.

There’s a generous free usage per day, which even on some of our production sites wasn’t costing anything.

1

u/Professional-Run3614 2d ago

I usually host my small apps on a single VPS, using Nginx to serve the React frontend and reverse-proxy requests to the backend. Simple and cost-effective.

0

u/Content-Public-3637 2d ago

You can host your app for free at homeport, reach out if you need support, 

1

u/AdmiredPounding 2d ago

homeport's great if you're just messing around but it gets pricey fast if you need more than the free tier

1

u/Content-Public-3637 2d ago

Not sure am following because it’s even cheaper than hosting on your own VPS.

0

u/leeharrison1984 2d ago

Cloudflare is easy and the free tier is pretty generous. Frontend can just be a static worker, backend will likely need to be tweaked to fit into their interface depending on what you have now.

0

u/sateliteconstelation 2d ago

My apps are pretty simple, and I use netilify drops.

-1

u/dutchman76 2d ago

Front end is easy. It's just html, cas and js files. If you use router, you need a rewrite rule to send all requests to the index.html

Back end depends on what you use

-1

u/couldhaveebeen 2d ago

No, we don't know