def create_app(): app = Flask(__name__) app.config.from_object('settings') MongoEngine(app) init_routes(app) return app
def init_app(): """Initialize the application. Works including : - setting up hackathon factory, - register restful API routes - initialize scheduled jobs """ init_components() from views import init_routes init_routes() init_schedule_jobs()
def init_app(): """Initialize the application. Works including : - setting up hackathon factory, - register restful API routes - initialize scheduled jobs """ init_components() from views import init_routes init_routes() init_schedule_jobs() health_check_guacamole = RequiredFeature("health_check_guacamole") u = RequiredFeature("util") if u.is_local(): log.debug("guacamole status: %s" % health_check_guacamole.report_health())
# -*- coding: utf-8 -*- __author__ = 'hubian' from flask import Flask from flask_restful import Api # initialize flask and flask restful app = Flask(__name__) app.config['SECRET_KEY'] = "myNameIsHuBian" app.debug = True api = Api(app) from utils import init_factory init_factory() from views import init_routes init_routes()