0

サンプル フラスコ アプリ用に Windows でウェイトレス WSGI を実行しようとしていますが、動作せず、エラーが発生します。

It had these arguments:
1. module 'myapp' has no attribute 'create_app'

私は使っている

waitress-serve --port=80 --call  "myapp:create_app"

以下は、同じディレクトリにある私の2つのファイルです

myapp.py

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello():
    return "Hello World!"

if __name__=="__main__":
    app.debug = True
    app.run(host='0.0.0.0')

create_app.py

from myapp import app

if __name__=='__main__':
    app.run()
4

1 に答える 1