0% found this document useful (0 votes)
7 views1 page

AWS ReactApp Deployment

Uploaded by

tmdjgs7zjq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

AWS ReactApp Deployment

Uploaded by

tmdjgs7zjq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

STEP 1: Install Nodejs and NPM using these commands

sudo yum install nodejs


node --version

STEP 2: Install NGINX server

sudo yum install nginx


check server ip - Your public IP

Enable Nginx to automatically starts if the server restarts.

sudo systemctl enable nginx

systemctl start nginx


systemctl stop nginx
systemctl restart nginx

Check the status Nginx

systemctl status nginx

STEP 3: Get your project into your server

Go to your public html folder


cd /var/www/html
or
cd /usr/share/nginx/html

clone react project from github repository

sudo yum install git

git clone your_repository

Step 4: Build your project

cd reactApp_Name

npm install
npm run build

STEP 6: Configure NGINX to serve static files

sudo nano /etc/nginx/nginx.conf

Add these lines


root /var/www/html/reactApp_Name/build;

Restart nginx
sudo service nginx restart

map port with domain

You might also like