jkaberg / tvhProxy

An small flask app to help Plex DVR connect with Tvheadend
Other
216 stars 107 forks source link

Run on port 80 and 5004 without the need for a webserver #19

Closed tjeh closed 7 years ago

tjeh commented 7 years ago

If modify the script and add the code below your script will run on both 80 and 5004 without the need for a seperate webserver

import threading

if name == 'main': httpdevice = WSGIServer((config['bindAddr'], 80), app.wsgi_app) httpstream = WSGIServer((config['bindAddr'], 5004), app.wsgi_app) t1 = threading.Thread(target=httpdevice.serve_forever) t2 = threading.Thread(target=httpstream.serve_forever) for t in t1, t2: t.start() for t in t1, t2: t.join()

Sorry for the bad formatting