2023-04-08 20:05:35 -05:00
|
|
|
# run.py from https://www.devdungeon.com/content/run-python-wsgi-web-app-waitress
|
|
|
|
import os
|
|
|
|
from waitress import serve
|
|
|
|
from api_app import api_app # Import your app
|
|
|
|
|
|
|
|
# Run from the same directory as this script
|
|
|
|
this_files_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
os.chdir(this_files_dir)
|
|
|
|
|
|
|
|
# `url_prefix` is optional, but useful if you are serving app on a sub-dir
|
|
|
|
# behind a reverse-proxy.
|
2023-04-15 16:37:31 -05:00
|
|
|
serve(api_app, host='0.0.0.0', port=5001)
|