MCPcopy Create free account
hub / github.com/caesarHQ/textSQL / create_app

Function create_app

api/app/__init__.py:14–43  ·  view source on GitHub ↗
(config_object=FlaskAppConfig)

Source from the content-addressed store, hash-verified

12
13
14def create_app(config_object=FlaskAppConfig):
15 app = Flask(__name__)
16 app.config.from_object(config_object)
17 CORS(app)
18
19 # Initialize app with extensions
20 db.init_app(app)
21 # migrate = Migrate(app, db)
22 with app.app_context():
23 db.create_all()
24 admin = Admin(None, name='admin', template_mode='bootstrap3')
25 admin.init_app(app)
26
27 @app.route("/ping")
28 def ping():
29 return 'pong'
30
31
32 app.register_blueprint(api_bp, url_prefix='/api')
33 app.register_blueprint(plugin, url_prefix='/plugin')
34 app.register_blueprint(discoverability, url_prefix='/examples')
35 app.register_blueprint(plugin_config)
36
37 # from app.errors import bp as errors_bp
38 # app.register_blueprint(errors_bp)
39
40 # from app.main import bp as main_bp
41 # app.register_blueprint(main_bp)
42
43 return app

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected