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

Add --debug option to server to log tracebacks on failures

podman build . -t cheat.sh
    podman run -it --rm -p 8002 cheat.sh bin/srv.py --debug

https://stackoverflow.com/questions/26026148/how-to-run-wsgiserver-in-verbose-or-debug-mode
This commit is contained in:
Anatoli Babenia
2020-07-28 23:08:04 +03:00
parent b2114a43fa
commit c9a959f087
+3
View File
@@ -274,6 +274,9 @@ def answer(topic=None):
return result
return Response(result, mimetype='text/plain')
if '--debug' in sys.argv:
app.debug = True
if 'CHEATSH_PORT' in os.environ:
PORT = int(os.environ.get('CHEATSH_PORT'))
else: