Goal: To set up an easy HTML web server on a Raspberry Pi
You will need:
- Raspberry Pi (Preferred 2,3,or 0, the 4 and 400 can be used for better things)
- Node.js installed on said Pi
sudo apt install nodejs
OR install it via Pi-Apps
How to install:
git clone github.com/pxlmastr00/raspberry-pi-web-server
cd Raspberry-Pi-Web-Server
bash install.sh
You can now delete the download.
cd /home/pi/server
-
Now, we will make the website. Navigate into 'site' and go to
index.html
. This is your site. Feel free to add CSS and JavaScript. -
Starting the website:
Let's start the server. Navigate to /home/pi/server
and run:
node index.js
- Open up a terminal tab and run:
hostname -I
- Your website will be the IP followed by :3000.