DP2 react dummy deploy
This project has the purpose to show how to deploy a reac app into a AWS S3 bucket.
Run It
First, git clone
the project and enter to the project folder. Then, follow the next instructions:
- Install all package dependencies
npm install
Run in development mode:
- Runs the application is development mode. By defaullt it runs on port 3000.
npm start
Now got to http://localhost:3000/
Deploy to AWS S3 bucket:
- Deploys the app to an aws S3 bucket.
- Make the build folder, wich will contain all required files for our app.
npm run build
- After the execution of that command, you will be able to see a new folder: "./build".
- Log in into your aws account and create an S3 bucket with all read permissions enabled.
- In the created bucket, in the "properties" option switch to "enable" the option to host static web sites.
- Drag all the content of the "build" folder and drag them into the S3 bucket panel to satart to load them.
- Select all files to load.
- Allow public read to everybody.
- Once all the files have been loaded correctly, in your browser go to the corresponding URL to check the app runnig.
- For example purposes an already deployed app can be accesed here: http://dp2-test-deploy.s3-website-us-east-1.amazonaws.com/.