/dp2-react-template-deploy

Small template project for DP2

Primary LanguageJavaScriptMIT LicenseMIT

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.
  1. Make the build folder, wich will contain all required files for our app.
npm run build

img

  1. After the execution of that command, you will be able to see a new folder: "./build".
  2. Log in into your aws account and create an S3 bucket with all read permissions enabled.
  3. In the created bucket, in the "properties" option switch to "enable" the option to host static web sites.

img

img

  1. Drag all the content of the "build" folder and drag them into the S3 bucket panel to satart to load them.

img

img

  1. Select all files to load.
  2. Allow public read to everybody.

img

img

  1. Once all the files have been loaded correctly, in your browser go to the corresponding URL to check the app runnig.