mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-08-11 09:13:48 -04:00
Fix debug server
aka python main.py --debug
This commit is contained in:
parent
c89ff000eb
commit
30f08304a8
@ -4,6 +4,7 @@ import sys
|
||||
|
||||
from libretranslate.app import create_app
|
||||
from libretranslate.default_values import DEFAULT_ARGUMENTS as DEFARGS
|
||||
from werkzeug.serving import run_simple
|
||||
from werkzeug.middleware.dispatcher import DispatcherMiddleware
|
||||
|
||||
|
||||
@ -268,7 +269,7 @@ def main():
|
||||
args.host = "::"
|
||||
|
||||
if args.debug:
|
||||
app.run(host=args.host, port=args.port)
|
||||
run_simple(args.host, args.port, app)
|
||||
else:
|
||||
from waitress import serve
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user