Forums

Getting Hello From Flask, my flask webapp not showing up.

I am trying to set up my already-existing flask app, but am having difficulty. I have git cloned my files into the bash console and have written my paths, but my app is still not showing up.

this is my app.py file, which is separate from my routes.py (which shows all the views)

from database import db
from flask import Flask
import os.path
from routes import wally
from socket import gethostname

def create_app():
    app = Flask(__name__)
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///problems.db'
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
    db.init_app(app)
    app.register_blueprint(wally, url_prefix='')
    return app


def setup_database(app):
    with app.app_context():
        #Problem.query.delete()
        #db.session.commit()
        db.create_all()


if __name__ == '__main__':
    app = create_app()
    if not os.path.isfile('/problems.db'):
        setup_database(app)
    if 'liveconsole' not in gethostname():
        app.run(debug = True)

and here is my wsgi file

import sys

# add your project directory to the sys.path
project_home = '/home/codingwithwally/codingwithwally'
if project_home not in sys.path:
    sys.path = [project_home] + sys.path

# import flask app but need to call it "application" for WSGI to work
from app import app as application  # noqa

any help is appreciated!

It looks like it's working now.