Sensor servers for Telecom Box
Project description
# Sensor API for the Raspberry Pi
## Installation:
Install the required software:
```
sudo apt update
sudo apt install libatlas-base-dev libopenjp2-7-dev gunicorn3
```
## Running
```
gunicorn --bind=0.0.0.0:8081 heiafr.hydrocontest.sensor_api:app
```
or start using sysdemd (e.g. hydro-sensors.service):
```
[Unit]
Description=Hydrocontest Sensors server
After=network.target
[Service]
User=root
Group=root
ExecStart=gunicorn --bind=0.0.0.0:8081 heiafr.hydrocontest.sensor_api:app
[Install]
WantedBy=multi-user.target
```
## Nginx Configuration
```
location /sensors {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8081/;
proxy_read_timeout 90;
}
```
## Installation:
Install the required software:
```
sudo apt update
sudo apt install libatlas-base-dev libopenjp2-7-dev gunicorn3
```
## Running
```
gunicorn --bind=0.0.0.0:8081 heiafr.hydrocontest.sensor_api:app
```
or start using sysdemd (e.g. hydro-sensors.service):
```
[Unit]
Description=Hydrocontest Sensors server
After=network.target
[Service]
User=root
Group=root
ExecStart=gunicorn --bind=0.0.0.0:8081 heiafr.hydrocontest.sensor_api:app
[Install]
WantedBy=multi-user.target
```
## Nginx Configuration
```
location /sensors {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8081/;
proxy_read_timeout 90;
}
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for heiafr-hydrocontest-sensor_api-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a22d2bd7661647b5c9a06056fc5d114e6212daba95e19d1be77fff9c3e85645 |
|
MD5 | 6d2186d00b955321d11dff1d46c15cf7 |
|
BLAKE2b-256 | 257051c918bbf7d0ff18dbf4b4961e76526b4b316dba3d828c8c92c14a4cfb92 |