import os from flask import Flask import data.document def create_app(): app = Flask(__name__) src_path = os.path.dirname(os.path.realpath(__file__)) data.document.set_document_root(os.path.realpath(src_path+'/../data/doc')) from api import document app.register_blueprint(document.bp) return app