diff --git a/bin/srv.py b/bin/srv.py index 3214a58..8d4f447 100644 --- a/bin/srv.py +++ b/bin/srv.py @@ -50,5 +50,7 @@ def wttr(location=None): "Main function wrapper" return wttr_srv.wttr(location, request) -SERVER = WSGIServer((LISTEN_HOST, LISTEN_PORT), APP) +SERVER = WSGIServer( + (LISTEN_HOST, int(os.environ.get('WTTRIN_SRV_PORT', LISTEN_PORT))), + APP) SERVER.serve_forever()