1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

Show server port on startup

This commit is contained in:
Anatoli Babenia
2020-07-28 18:32:32 +03:00
parent f024e4d561
commit b89e7196f4
+5 -4
View File
@@ -275,8 +275,9 @@ def answer(topic=None):
return Response(result, mimetype='text/plain')
if 'CHEATSH_PORT' in os.environ:
SRV = WSGIServer((CONFIG['server.bind'], int(os.environ.get('CHEATSH_PORT'))), app) # log=None)
SRV.serve_forever()
PORT = int(os.environ.get('CHEATSH_PORT'))
else:
SRV = WSGIServer((CONFIG['server.bind'], CONFIG['server.port']), app) # log=None)
SRV.serve_forever()
PORT = CONFIG['server.port']
SRV = WSGIServer((CONFIG['server.bind'], PORT), app) # log=None)
print("Starting server on {}:{}".format(SRV.address[0], SRV.address[1]))
SRV.serve_forever()