Host React Application
Create Simple ReactJs Application and Host in XAMPP

Prerequisite
Check Node and NPM version

Install create-react-app
Create a new react app
Create a project

Run the project

Check in browser

Let us create two webpages home and aboutus in our application
Install react router

Create webpages folder inside src folder.
Write following code in src/webpages/home.js
Write following code in src/webpages/aboutus.js
Write following code in src/webpages/index.js
Modify src/App.js
Run the application


Build the react application for deployment


Setup a virtual host
Create a virtual host
Make a domain name entry in hosts file
Start your Xampp and browse url


Add .htaccess file in public folder
What is .htaccess file?
Create a public/.htaccess file

Add homepage in package.json file

Rebuild react application
Stop and restart your XAMPP again and browse url



REFERENCES
Last updated