React Exercise

Install Build Dependencies:

Clone React Build Artifacts:

Clone the following repository to the home directory:

git clone https://github.com/LaunchCodeTechnicalTraining/react-tic-tac-toe-build-artifacts

How do you deploy the react-tic-tac-toe project using Caddy?

Click Here for Answer

Ensure the caddy service is running:

systemctl status caddy

check caddy.service status check caddy.service status

Start the caddy service if it is inactive:

sudo systemctl start caddy

Create a Caddyfile

  • You can create the Caddyfile anywhere you would like. For this exercise it was created inside of the home directory.

Add the following code to the Caddyfile

## Default localhost port
https://localhost {
    ## Path to build directory
    root * /home/student/react-tic-tac-toe-build-artifacts
    ## file_server directive
    file_server
}

Reload the Caddy Service:

caddy reload

Reload Caddy Service Reload Caddy Service

Open Localhost in the browser:

Open https://localhost in browser Open https://localhost in browser