""" App entry point. """ from gatco import Gatco from gatco.sessions import RedisSessionInterface, CookieSessionInterface from config import Config #from sanic_cors import CORS, cross_origin app = Gatco(name=__name__) app.config.from_object(Config) app.session_interface = CookieSessionInterface() app.components = {} #cors = CORS(app, automatic_options=True) from .database import init_database from .extensions import init_extensions init_database(app) init_extensions(app) # static_endpoint = app.config.get("STATIC_URL", None) # if (static_endpoint is not None) and not ((static_endpoint.startswith( 'http://' ) or (static_endpoint.startswith( 'https://' )))): # app.static(static_endpoint, './static') app.static("/static", './static', name='static')
""" App entry point. """ from gatco import Gatco from .config import Config app = Gatco(name=__name__) app.config.from_object(Config) from application.database import init_database from application.extensions import init_extensions from application.controllers import init_views static_endpoint = app.config.get("STATIC_URL", None) if (static_endpoint is not None) and not ((static_endpoint.startswith('http://') or (static_endpoint.startswith('https://')))): app.static(static_endpoint, './static') init_database(app) init_extensions(app) init_views(app)
""" App entry point. """ from gatco import Gatco from gatco.sessions import CookieSessionInterface from .config import Config app = Gatco(name=__name__) app.session_interface = CookieSessionInterface() app.config.from_object(Config) from application.database import init_database from application.extensions import init_extensions from application.controllers import init_views static_endpoint = app.config.get("STATIC_URL", None) if (static_endpoint is not None) and not ((static_endpoint.startswith('http://') or (static_endpoint.startswith('https://')))): app.static(static_endpoint, './static') init_database(app) init_extensions(app) init_views(app)
""" App entry point. """ from gatco import Gatco from gatco.sessions import CookieSessionInterface from sanic_cors import CORS, cross_origin # from .config import Config from .config.production import Config import firebase_admin from firebase_admin import credentials app = Gatco(name=__name__) app.session_interface = CookieSessionInterface() CORS(app, automatic_options=True) app.config.from_object(Config) from application.database import init_database from application.extensions import init_extensions from application.controllers import init_controllers init_database(app) init_extensions(app) init_controllers(app) # cred = credentials.Certificate("./application/config/drlinks-60439-7dd5cd02649d.json") # firebase_admin.initialize_app(cred) # default_app = firebase_admin.initialize_app()