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)
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)
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()
from api.views import app if __name__ == "__main__": app.run(host="0.0.0.0", debug=True)
from api.views import app if __name__ == '__main__': app.run(debug=False)