This article assumes you’ve already got a Raspberry Pi set up and running the latest Raspberry Pi OS, and you’ll be hosting a React app locally (meaning it’s only accessible on your local network).
First you’ll want to enable SSH. There’s some fancy ways to do this in the terminal, but the easiest is to just enable it in the preferences.
sudo nano /etc/ssh/sshd_config. You potentially won’t need to run this command with
sudo, but when you do… you’ll most certainly feel more powerful.
Once you find that line, you’ll want to edit it so it reads like so:
That’s it! You can close out of nano and save your changes.
sshing from another Mac or Linux machine. Go ahead and
SSHinto your pi with
ssh [username]@[IPaddress]at which point, you’ll be prompted for the password on the Pi to log in. Enter the password and you’ll hit the
/homedirectory of the Pi!
npx create-react-app /some-projectand off it went! Once your React app is set up, you can access it from any device on your network by going to the IP address of your Pi (the one that appeared when you ran
hostname -I), then a colon with the port number, just like you would on