I have created a flask app.I want to run this both development and production server. This is my app.py file:
app = Flask(__name__)
db = SQLAlchemy(app)
app.config.from_object(Config)
db.init_app(app)
if __name__ == "__main__":
app.run()
this is my wsgi.py file:
from app import app as application
app = application
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=5000)
I want to know if my wsgi configurtion is ok or is it the right way to do it.How can i make sure my production server will run wsgi.py file with the production database configuration?In local i am getting this warning Use a production WSGI server instead
.the way i configured willl it ensure it will run on wsgi server in prodcution?While i run this command:
uwsgi --wsgi-file app.py --http :5000
i am getting internal server error in localhost:5000.