Step 2 - Build your React frontend
Course: Frontend Deployments on AWS - chapter 2
💡 This approach will not work for frameworks that use Server side rendering (like Next.js) This will work for basic React apps, HTML/CSS/JS apps
Go to your react project
Section titled “Go to your react project”cd /link/to/your/react/projectBuild your project
Section titled “Build your project”npm run buildTry serving the HTML/CSS/JS locally
Section titled “Try serving the HTML/CSS/JS locally”npm i -g serveserveAt this point you have basic HTML/CSS/JS code that you can deploy on the internet.
You might be tempted to host this on an EC2 instance, but that is not the right approach
The next slide explains why