huserben / idasen-rest-bridge

MIT License
7 stars 1 forks source link

Add waitress for production run #4

Open Dunky13 opened 2 years ago

Dunky13 commented 2 years ago

I want to run this on a Raspberry Pi Zero W (Gen 1) and with limited resources running a debug dev server takes a lot of resources. Please consider a startup script using waitress, suggested by flask: https://flask.palletsprojects.com/en/2.0.x/tutorial/deploy/

Also, please consider adding a service, so this can rest api can start on system startup. As I want to RPI-0 do only Idasen control. Thank you!

huserben commented 2 years ago

Hi @Dunky13

thanks for the hint about waitress, I was not aware of that. Also the idea with the service makes sense.

However I will not have much time in the upcoming weeks, and as I'm not a python expert probably I will not look into these things then. In case you will check it out, I'll encourage you to raise a PR with the changes so others could profit as well.

I'll leave this issue open for the time being, but as mentioned currently I won't have any plans on taking this up.