Deploy React web application to shared hosting

Here's how we can run our ReactJS Project on the server:


First, open the ReactJS project we created earlier in VS Code(Text Editor I'm using)

Second, Run the ReactJS Program that was created on the VS Code terminal

 --npm start


By default, Create React App produces a build assuming your app is hosted at the server root. To override this, specify the homepage in your package.json

Third, Open the package.json file in the Project Folder that has been created add

 "homepage": "enter url",

 below from the text "version": "0.1.0"

Fourth, we stop the project that has been running earlier

Ctrl + C on keyboard



Fifth, write in the VS Code terminal

npm run build

After the process is complete, then it appears

-- folder build


Sixth, open the build folder and then copy and paste it in the destination server directory


Then open the url that we have created in the browser




Berlangganan Untuk Menerima Update Terbaru:

0 Response to "Deploy React web application to shared hosting"

Post a Comment