Flask-User-starter-app
Flask-User-starter-app copied to clipboard
Running a production server
i see you have gunicorn in the requirements.txt but i can't seem to able to run the application using gunicorn ? any help ?
I am also having trouble deploying this app. I tried on PythonAnywhere and Heroku. I am getting a 404 on both. Anyone any ideas?
This is due to not calling init_app
in manage.py
. I fixed this by changing manage.py
to be:
# This file starts the WSGI web application.
# - Heroku starts gunicorn, which loads Procfile, which starts manage.py
# - Developers can run it from the command line: python runserver.py
from app.init_app import app, init_app, manager
init_app(app)
# Start a development web server, processing extra command line parameters. E.g.:
# - python manage.py init_db
# - python manage.py runserver
if __name__ == "__main__":
manager.run()
This worked for me.
Thank you.