DEV Community

Adithyan A
Adithyan A

Posted on • Originally published at adithyana.hashnode.dev on

Host ReactJS App On GitHub Pages

What is this blog about

In this blog, I am going to tell you how we can host a react-js web app on GitHub Pages

Prerequisite

  • The ReactJS app should have a GitHub repository

  • The GitHub repositories visibility should be public

  • You should know the basics of git

Steps By Step Instruction

  1. Add a remote that points to the GitHub repository

  2. Install the GH-Pages package inside the react app

  3. Add homepage field to the package.json file

  4. Add predeploy and deploy scripts to the package.json scripts section

In my case, it will be

  1. Run the deploy command in terminal

  2. Publishing the newly deployed branch - gh-pages

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs