import os import cic_eth.cli from cic_eth.graphql.config import config from flask import Flask from flask_graphql import GraphQLView from cic_eth.graphql.schema import schema app = cic_eth.cli.CeleryApp.from_config(config) app.set_default() print(app) def create_app(): flask_app = Flask(__name__) flask_app.add_url_rule( '/graphql', view_func=GraphQLView.as_view( 'graphql', schema=schema, graphiql=True ) ) @flask_app.route("/") def test(): return "Test ok!" return flask_app if __name__ == "__main__": flask_app = create_app() flask_app.run(host='0.0.0.0', port=5000, debug=True)