Deploy React app Free with GitHub | IndianTechnoEra - IndianTechnoEra
Latest update Android YouTube

Deploy React app Free with GitHub | IndianTechnoEra

Deploy React app Free with GitHub | IndianTechnoEra

We can easily deploy our live react projects freely with github

First of all we need to install keep the installed all recommended elements for creating a react app

like Node, editor, browser, etc one more thing GIT and GitHub also

GIT is mandatory


Deploy React app Free with GitHub | IndianTechnoEra 



1. Open the command prompt in any folder and perform the commands

mkdir ReactProject

cd ReactProject

npm init react-app my-project-name

cd sam-counter-app

npm start

ctrl+c -->y for stop 

npm install gh-pages --save -dev


2. Goto in package.jsom file in the project folder

a.) Add at top of the first array as key-value pair

"homepage": "http://snawaza243.github.io/my-created-repo",

The above link is the link of the created repository where our project will serve so create a repo in your GitHub account.

b.) Confirm the following key value in the dependencies section

 "dependencies": {

    "gh-pages": "^4.0.0",

}

c.) Add in the following key-value data in the script block

"predeploy":"npm run build",

"deploy":"gh-pages -d build",


3. Now again on the command prompt or terminal perform the following task

git add .

git commit -m "Deploy counter app sam-counter-app"

npm run deploy

git push -u origin or master


Key: How to host react app on github free?

إرسال تعليق

Feel free to ask your query...
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.