Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fourcube/detect-rpi
Detects if node is running on a Raspberry Pi.
https://github.com/fourcube/detect-rpi
Last synced: 2 months ago
JSON representation
Detects if node is running on a Raspberry Pi.
- Host: GitHub
- URL: https://github.com/fourcube/detect-rpi
- Owner: fourcube
- License: mit
- Created: 2017-05-11T06:47:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T08:09:55.000Z (10 months ago)
- Last Synced: 2024-11-01T15:48:19.728Z (3 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 18
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/detect-rpi.svg)](https://badge.fury.io/js/detect-rpi)
# detect-piDetect if node is currently running on a raspberry pi.
## Usage
`npm install detect-rpi --save`
```js
const isPi = require('detect-rpi');if (isPi()) {
console.log('Running on Raspberry Pi!');
} else {
// ...
}
```## How?
Reads /proc/cpuinfo and checks for the hardware model.