0

I finished my Udacity Cloud Developer nanodegree and I want to make a custom domain to showcase on my portfolio.

The stack I use includes: Api Gateway, Lambda, DynamoDB, Nodejs, S3 and Serverless framework. Frontend is : React.

However, Im stuck on comprehending how to deploy the full app, with React frontend?

Something like: anc.com would navigate to my app. I found many solutions mentioning about using serverless-domain-manager.

But what about my React front end? I read some solutions saying to deploy static web using S3.

But my app currently has S3 to store the uploaded images.

If I deploy my frontend with S3, do I have to make 2 S3 buckets?

Currently, I have to use 2 terminals, SLS deploy for backend, and npm run start to run the front end at localhost.

My github code: https://github.com/ploratran/DogLookBook

ZaO Lover
  • 433
  • 2
  • 13
  • You can host your react app on netlify and associate custom domain to your react app and access your node js app with api requests from your react app – angelo Jan 23 '21 at 08:38
  • @angelo Hi. Thank you for your answer. Do you know any mediums or tutorial on how to host on netlify and access nodejs app from the react app? – Tran Phuong Jan 23 '21 at 19:10
  • hosting on netlify is easy you can follow this blog https://www.freecodecamp.org/news/how-to-deploy-a-react-application-to-netlify-363b8a98a985/ – angelo Jan 24 '21 at 06:35
  • For using react with node you can use axios to make http requests from your frontend to the url of your backend. – angelo Jan 24 '21 at 06:38

1 Answers1

0

The team at Serverless has also released a tool called components, one of which looks like its perfect for what you want to do; it automatically handles everything on the cloud to get your React files hosted and a domain assigned too: https://github.com/serverless-components/website

Gareth McCumskey
  • 1,510
  • 7
  • 12
  • Thank you for your answer. I have 1 follow up question. I need a S3 bucket to deploy the frontend with serverless-components. Do I have to create a 2nd S3 bucket since I already have 1 bucket right now for storing the uploaded images. – Tran Phuong Jan 23 '21 at 19:17
  • This creates an entirely new S3 bucket automatically for you so you don't need to go and create anything in AWS yourself. – Gareth McCumskey Mar 09 '21 at 18:39