Tag Archives: Software

Deploy React – on AWS

Deploy on to AWS EC2 running nginx

  1. ssh into the EC2 instance
  2. if npm is NOT installed, execute sudo apt install npm -y
  3. cd into <dev> dir
  4. git clone the repo
  5. cd into the repo
  6. execute npm install
  7. execute npm run build
  8. cp -R dist/* /var/www/<host>/html
  9. might have to re-launch nginx

– manzoor

React Hello World

Create the App

  1. cd into a new / clean dir
  2. execute – npx create-react-app <app_name>
  3. a new sub-dir with this app_name will be created
  4. cd into the new sub-dir with the new app_name
  5. execute npm start – this will eventually list a local URL Open a browser to this to verify the new app is running
  6. Edit the App.js file in src dir and clear most of the content and simply replace it with “Hello World”. The app should now show “Hello World” text.

Customize the App

  1. stop the app (at least for the next step)
  2. Add bootstrap (for CSS styling)
    • execute npm install bootstrap
  3. at this point can re-launch the app by executing npm run dev

– manzoor

Deploy on to AWS

Deploy on to Heroku