Initial setup of a cloud function.

This commit is contained in:
Tom Alexander
2021-07-20 22:24:32 -04:00
parent b0bc1c1520
commit e3b6049f60
6 changed files with 122 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import json
def push_to_pubsub(request_params):
print(json.dumps(request_params))
def main(request):
request_json = request.get_json(silent=True)
request_args = request.args
if request_json:
push_to_pubsub(request_json)
elif request_args:
push_to_pubsub(request_args)
else:
raise Exception("No data provided.")
return {"status": "ok"}

View File

@@ -0,0 +1 @@
Flask==1.1.2