add python cloud function
This commit is contained in:
0
cloud-functions/python/functions/.gitignore
vendored
Normal file
0
cloud-functions/python/functions/.gitignore
vendored
Normal file
17
cloud-functions/python/functions/main.py
Normal file
17
cloud-functions/python/functions/main.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Deploy with `firebase deploy`
|
||||
|
||||
from firebase_functions import https_fn
|
||||
from firebase_admin import initialize_app
|
||||
|
||||
# initialize_app()
|
||||
#
|
||||
#
|
||||
# @https_fn.on_request()
|
||||
# def on_request_example(req: https_fn.Request) -> https_fn.Response:
|
||||
# return https_fn.Response("Hello world!")
|
||||
|
||||
initialize_app()
|
||||
|
||||
@https_fn.on_request()
|
||||
def on_request_example(req: https_fn.Request) -> https_fn.Response:
|
||||
return https_fn.Response("Hello world!")
|
||||
1
cloud-functions/python/functions/requirements.txt
Normal file
1
cloud-functions/python/functions/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
firebase_functions~=0.1.0
|
||||
Reference in New Issue
Block a user