hv2-all-in-one/api/server.py
2021-09-11 19:19:16 +02:00

19 lines
421 B
Python

import connexion
from flask_cors import CORS
# instantiate the webservice
app = connexion.App(__name__)
app.add_api('openapi.yaml', options = {"swagger_ui": False})
# CORSify it - otherwise Angular won't accept it
CORS(app.app,
origins=[
"http://localhost:4200",
"https://base.hv.nober.de"
],
supports_credentials=True
)
# provide the webservice application to uwsgi
application = app.app