Example REST API service for the Homeberry project
- You need create a new virtual environment for the flask webserver. There is a lot of tutorials online, but basically you want to create an virtual environment for the server:
$ virtualenv homeberryApi
-
Edit
homeberryApi.py
to your run your services / commands -
Create and start service on boot by copying the homeberryApi.service file to
/etc/systemd/system/
directory and enabling it:
$ sudo systemctl enable homeberryApi.service
$ sudo systemctl start homeberryApi.service