1
0
Fork 0
mirror of https://github.com/coko7/monirasp-api.git synced 2026-07-20 21:04:59 +00:00
A simple API to monitor a Raspberry Pi.
  • TypeScript 43.7%
  • JavaScript 24.8%
  • HTML 16.7%
  • CSS 9.8%
  • Shell 5%
Find a file
2025-10-13 09:49:20 +02:00
frontend fix temperature color bug in frontend/main.js 2025-10-13 09:49:20 +02:00
src fix data/temperatures.csv growing infinitely 2025-10-13 09:48:54 +02:00
.gitignore fix data/temperatures.csv growing infinitely 2025-10-13 09:48:54 +02:00
CHANGELOG.md fix temperature color bug in frontend/main.js 2025-10-13 09:49:20 +02:00
LICENSE fix CORS issues + fix bash script + update documentation 2025-10-13 09:48:41 +02:00
package-lock.json fix CORS issues + fix bash script + update documentation 2025-10-13 09:48:41 +02:00
package.json fix temperature color bug in frontend/main.js 2025-10-13 09:49:20 +02:00
README.md update README 2025-10-13 09:49:11 +02:00
tempmon.sh fix data/temperatures.csv growing infinitely 2025-10-13 09:48:54 +02:00
tsconfig.json add Express API + temperature monitoring 2025-10-13 09:48:02 +02:00

monirasp-api

What is it?

A simple API written in Express.js that allows you to display your Raspberry Pi temperature on a cool website. Is it overkill? Well, if you are here, that means you were looking for it right?

Prequisites

⚠️ This project only works if your Raspberry Pi runs on Raspbian. ⚠️

Please make sure you have both npm and Node.js installed.

Installation

Simply run the following command to install to install the required dependencies on your system:

npm i

Running the server

First, run the bash script that monitors your Raspberry Pi temperature:

chmod +x tempmon.sh
./tempmon.sh

Then, start the Express server to make data available through the Express API:

npm start

Accessing the API

Once everything is running, you can access your Pi temperature at GET http://localhost:3000/temperature.

Alternatively, you can try the API directly with an actual website. There is an example website in the frontend folder. You may serve the website statically with a webserver such as Apache or Nginx or access it directly from your browser.