You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/cloud_run_async/README.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,38 +3,50 @@
3
3
This sample shows how to deploy asynchronous functions to [Cloud Run functions](https://cloud.google.com/functions) with the Functions Framework. It includes examples for both HTTP and CloudEvent functions, which can be found in the `main.py` file.
4
4
5
5
## Dependencies
6
+
6
7
Install the dependencies for this example:
8
+
7
9
```sh
8
10
pip install -r requirements.txt
9
11
```
10
12
11
13
## Running locally
12
14
13
15
### HTTP Function
16
+
14
17
To run the HTTP function locally, use the `functions-framework` command:
18
+
15
19
```sh
16
20
functions-framework --target=hello_async_http
17
21
```
22
+
18
23
Then, send a request to it from another terminal:
24
+
19
25
```sh
20
26
curl localhost:8080
21
27
# Output: Hello, async world!
22
28
```
23
29
24
30
### CloudEvent Function
31
+
25
32
To run the CloudEvent function, specify the target and set the signature type:
0 commit comments