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

Leave a comment