4

I have a web app in which front-end is made on reactJs and backend is built on nodejs.Now I want to host this app as I have never host any react app before. SO what I am planning is to host my react part on amazon S3 and nodejs api on heroku.I want to know will this combination work perfectly or I need to try something different.

Please let me know how can I host this full stack app any idea will be appreciated.

THANKS

2 Answers 2

4

There are two ways:

  1. You can host your front-end on heroku itself. Build your react project and place your output folder in the node static files folder.
  2. If you want to use separate hosting, I would suggest you to use Netlify for front-end side.

Let me know if it helps.

Sign up to request clarification or add additional context in comments.

6 Comments

Before deploying react app on server we need to create its production version by using npm run build. What if I made some changes in code then do I need to run again this command to create production version.
Yes. You do. But the good thing is you can automate the process of uploading the output from the build command using CLI tools. I suggest you to watch this tutorial: youtube.com/watch?v=FMhVXOA54x8
BTW, Netlify also provide free SSL as well.
Does it provide custom domain support.
Yes. It does provide custom domain support.
|
0

S3 is storage service, so I don't think it's a good way to deploy your React app. You need a server that has ability to run web server for React application, for example serve, and your option may be EC2 of AWS.

You can deploy your Nodejs API and React part on anywhere (server) and just make sure they can connect together perfectly (call API from backend successfully). Additionally, you can also try to use NGINX as reverse-proxy to your React app.

Reference: CreateReactApp Deployment

1 Comment

Yes S3 is a storage service but we can also deploy static web apps on S3.It gives an option to deploy static content of web apps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.