25 lines
516 B
Python
25 lines
516 B
Python
from cic_eth.graphql.schema import schema
|
|
from flask import Flask
|
|
from flask_graphql import GraphQLView
|
|
|
|
|
|
def create_app():
|
|
app = Flask(__name__)
|
|
app.add_url_rule(
|
|
'/graphql',
|
|
view_func=GraphQLView.as_view(
|
|
'graphql',
|
|
schema=schema,
|
|
graphiql=True
|
|
)
|
|
)
|
|
@app.route("/")
|
|
def test():
|
|
return "Test ok!"
|
|
|
|
return app
|
|
|
|
if __name__ == "__main__":
|
|
app = create_app()
|
|
app.run(host='0.0.0.0', port=5000)
|