Move site.debug to _dev, _prod launchers.

master
voussoir 2021-01-28 16:46:54 -08:00
parent 481a16b950
commit 5bedabdc66
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
2 changed files with 6 additions and 1 deletions

View File

@ -21,9 +21,11 @@ from voussoirkit import vlogging
import bot
import ycdl
import backend
site = backend.site
site.debug = True
####################################################################################################
site = backend.site

View File

@ -1,5 +1,7 @@
'''
This file is the WSGI entrypoint for remote / production use.
Note that YCDL currenty features no authentication, so using it remotely without
another kind of access control is probably a bad idea!
If you are using Gunicorn, for example:
gunicorn ycdl_flask_prod:site --bind "0.0.0.0:PORT" --access-logfile "-"
@ -14,6 +16,7 @@ import backend
backend.site.wsgi_app = werkzeug.middleware.proxy_fix.ProxyFix(backend.site.wsgi_app)
site = backend.site
site.debug = False
# NOTE: Consider adding a local .json config file.
youtube_core = ycdl.ytapi.Youtube(bot.get_youtube_key())