1
0
mirror of https://gitlab.com/2-chainz/2-chainz-rest.git synced 2025-08-05 21:11:35 +00:00

converted to azure function

This commit is contained in:
2020-03-01 15:21:22 -07:00
parent 28b2c39c4c
commit a94cdfeb44
15 changed files with 243 additions and 79 deletions

10
chainz-rest/__init__.py Normal file
View File

@@ -0,0 +1,10 @@
import logging
import json
import azure.functions as func
import random
from . import quotes
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info("Python HTTP trigger function processed a request.")
return func.HttpResponse(json.dumps({"message": random.choice(quotes.quotes)}))