Skip to content

Commit b89e719

Browse files
committed
Show server port on startup
1 parent f024e4d commit b89e719

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bin/srv.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,9 @@ def answer(topic=None):
275275
return Response(result, mimetype='text/plain')
276276

277277
if 'CHEATSH_PORT' in os.environ:
278-
SRV = WSGIServer((CONFIG['server.bind'], int(os.environ.get('CHEATSH_PORT'))), app) # log=None)
279-
SRV.serve_forever()
278+
PORT = int(os.environ.get('CHEATSH_PORT'))
280279
else:
281-
SRV = WSGIServer((CONFIG['server.bind'], CONFIG['server.port']), app) # log=None)
282-
SRV.serve_forever()
280+
PORT = CONFIG['server.port']
281+
SRV = WSGIServer((CONFIG['server.bind'], PORT), app) # log=None)
282+
print("Starting server on {}:{}".format(SRV.address[0], SRV.address[1]))
283+
SRV.serve_forever()

0 commit comments

Comments
 (0)