Ejemplo n.º 1
0
from api.views import app
from flask import Flask
from config import app_configuration


def create_app(mode):
    app = Flask(__name__)
    app.config.from_pyfile('config.py')
    app.config.from_object(app_configuration[mode])

    return app


if __name__ == '__main__':
    app.run(debug=True)
Ejemplo n.º 2
0
from flask import Flask
from api.views import app
from api.connectdb import Configurations

config = Configurations()
config.create_questions_table()
config.create_users_table()
config.create_answers_table()

if __name__ == '__main__':
    app.run(debug=True, port=8080)
Ejemplo n.º 3
0
import os
from api.views import app
from api import utilities
 
app.config["SECRETE_KEY"] = "toosecrete"
app.config['DEBUG']= True

if __name__ == '__main__':
    utilities.Database()
    app.run()
Ejemplo n.º 4
0
from api.views import app


if __name__ == "__main__":
    app.run(host="0.0.0.0", debug=True)
Ejemplo n.º 5
0
from api.views import app

if __name__ == '__main__':
    app.run(debug=False)