Code for the Buddy Lamp project.
- Download this repo
- Open the Server folder in VS Code or a terminal
- Open the terminal
- Run
npm i
- Run
npm run start
- Go to Render.com
- Sign up for an account
- Go to the dashboard
- Create a new app (web service)
- Use this repo as the code
- Use the "main" branch and the folder "server"
- Use the Build Command
npm i
- Use the Start Command
npm run start
- Set Auto-Deploy to "Yes" (this will auto-deploy when I push changes)
- Download the client repo to your Raspberry Pi
- Alter the values (see the section below this)
- Open a terminal, go to the directory where the file is
- Run
python main.py
Hard-coding
- Hard-code the values for household name and lamp color
Making requests
- Your URL will need to be changed to your Render address (or other host address)