ReactJS deployment on S3 bucket

0

I have tried to deploy a web application with the backend in Node.js and the frontend in React. The backend is deployed on an EC2 instance, and the frontend (React app) is hosted on S3. However, I am facing an issue where the routes in the React app are not working. The application successfully loads the index.html page, but after logging in, it fails to redirect to the dashboard. Does S3 only support React SPA?

gefragt vor 4 Monaten278 Aufrufe
1 Antwort
0

Hello.

It should be possible to run ReactJS on S3.
The following document describes how to run the sample, so I think it will be helpful.
https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/deploy-a-react-based-single-page-application-to-amazon-s3-and-cloudfront.html

profile picture
EXPERTE
beantwortet vor 4 Monaten
profile pictureAWS
EXPERTE
überprüft vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen