https://github.com/coko7/monirasp-api
A simple API to monitor a Raspberry Pi.
https://github.com/coko7/monirasp-api
api bash expressjs monitoring nodejs raspberry-pi raspbian temperature-monitoring typescript
Last synced: 3 months ago
JSON representation
A simple API to monitor a Raspberry Pi.
- Host: GitHub
- URL: https://github.com/coko7/monirasp-api
- Owner: coko7
- License: mit
- Created: 2022-02-18T17:41:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-10-13T07:49:52.000Z (9 months ago)
- Last Synced: 2026-03-04T17:11:49.750Z (4 months ago)
- Topics: api, bash, expressjs, monitoring, nodejs, raspberry-pi, raspbian, temperature-monitoring, typescript
- Language: TypeScript
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://www.raspbian.org/). ⚠️_**
Please make sure you have both [npm](https://www.npmjs.com/) and [Node.js](https://nodejs.org/) installed.
## Installation
Simply run the following command to install to install the required dependencies on your system:
```sh
npm i
```
## Running the server
First, run the bash script that monitors your Raspberry Pi temperature:
```bash
chmod +x tempmon.sh
./tempmon.sh
```
Then, start the Express server to make data available through the Express API:
```bash
npm start
```
## Accessing the API
Once everything is running, you can access your Pi temperature at [GET http://localhost:3000/temperature](http://localhost:3000/temperature).
Alternatively, you can try the API directly with an actual website. There is an example website in the [frontend](./frontend) folder. You may serve the website statically with a webserver such as **Apache** or **Nginx** or access it directly from your browser.