mirror of
https://github.com/chubin/wttr.in
synced 2025-01-12 03:58:45 +00:00
use WTTRIN_SRV_PORT env variable if specified
This commit is contained in:
parent
a95a95cdb2
commit
49376a9871
1 changed files with 3 additions and 1 deletions
|
@ -50,5 +50,7 @@ def wttr(location=None):
|
||||||
"Main function wrapper"
|
"Main function wrapper"
|
||||||
return wttr_srv.wttr(location, request)
|
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()
|
SERVER.serve_forever()
|
||||||
|
|
Loading…
Reference in a new issue