This commit is contained in:
Wolfgang Hottgenroth 2021-05-06 13:35:55 +02:00
parent 6344a19ad1
commit 8c008bbb8e
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469
4 changed files with 26 additions and 5 deletions

View File

@ -31,6 +31,9 @@ components:
entry: entry:
description: Entry with timestamp and frequency description: Entry with timestamp and frequency
type: object type: object
required:
- timestamp
- frequency
properties: properties:
timestamp: timestamp:
description: Synchronized timestamp in RFC3339 format in timezone UTC description: Synchronized timestamp in RFC3339 format in timezone UTC

6
server.ini Normal file
View File

@ -0,0 +1,6 @@
[uwsgi]
http = :5000
wsgi-file = server.py
processes = 4
stats = :9191

View File

@ -1,8 +1,12 @@
import connexion import connexion
import logging from flask_cors import CORS
logging.basicConfig(level=logging.INFO) # instantiate the webservice
app = connexion.App(__name__)
app.add_api('openapi.yaml', options = {"swagger_ui": True})
app = connexion.App('SinkConvert2') # CORSify it - otherwise Angular won't accept it
app.add_api('./openapi.yaml') CORS(app.app)
app.run(port=8080)
# provide the webservice application to uwsgi
application = app.app

8
test.py Normal file
View File

@ -0,0 +1,8 @@
import connexion
import logging
logging.basicConfig(level=logging.INFO)
app = connexion.App('SinkConvert2')
app.add_api('./openapi.yaml')
app.run(port=8080)