Пример #1
0
def main():
    """Create app and run server."""
    app = create_app()
    app.run(
        host=app.config['CLAIMSTORE_HOST'],
        port=app.config['CLAIMSTORE_PORT'],
        debug=app.config['CLAIMSTORE_DEBUG']
    )
Пример #2
0
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("--initdb",
                        help="creates all db structure",
                        action='store_true')
    args = parser.parse_args()

    app = create_app(args.initdb)
    app.run(host='0.0.0.0', port=8080, debug=True)
Пример #3
0
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--initdb",
        help="creates all db structure",
        action='store_true'
    )
    args = parser.parse_args()

    app = create_app(args.initdb)
    app.run(host='0.0.0.0', port=8080, debug=True)
Пример #4
0
def clifactory():
    """Create a click CLI application based on configuration.

    :param create_app: Flask application factory function.
    """
    # Create application object without loading the full application.
    app = create_app()

    def create_cli_app(info):
        return app

    @click.group(cls=FlaskGroup, create_app=create_cli_app)
    def cli(**params):
        pass

    # Register CLI modules from packages.
    cli.add_command(database_cli)
    cli.add_command(eqid_cli)

    return cli
Пример #5
0
def clifactory():
    """Create a click CLI application based on configuration.

    :param create_app: Flask application factory function.
    """
    # Create application object without loading the full application.
    app = create_app()

    def create_cli_app(info):
        return app

    @click.group(cls=FlaskGroup, create_app=create_cli_app)
    def cli(**params):
        pass

    # Register CLI modules from packages.
    cli.add_command(database_cli)
    cli.add_command(eqid_cli)

    return cli
Пример #6
0
def app():
    """Create the flask app."""
    app_ = create_app()
    with app_.app_context():
        yield app_
Пример #7
0
# -*- coding: utf-8 -*-
#
# This file is part of ClaimStore.
# Copyright (C) 2015 CERN.
#
# ClaimStore is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# ClaimStore is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ClaimStore; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.
"""WSGI app creation."""

from __future__ import absolute_import

from claimstore.app import create_app

application = create_app()
Пример #8
0
# -*- coding: utf-8 -*-
#
# This file is part of ClaimStore.
# Copyright (C) 2015 CERN.
#
# ClaimStore is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# ClaimStore is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ClaimStore; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.

"""WSGI app creation."""

from __future__ import absolute_import

from claimstore.app import create_app

application = create_app()