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: functions/datastore/README.md
+50-20
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
3
3
# Google Cloud Functions Cloud Datastore sample
4
4
5
-
This recipe shows you how to read and write an entity in Datastore from a Cloud Function.
5
+
This recipe shows you how to read and write an entity in Cloud Datastore from a
6
+
Cloud Function.
6
7
7
8
View the [source code][code].
8
9
@@ -20,46 +21,75 @@ Functions for your project.
20
21
21
22
1. Create a Cloud Storage Bucket to stage our deployment:
22
23
23
-
gsutil mb gs://[YOUR_BUCKET_NAME]
24
+
gsutil mb gs://YOUR_BUCKET_NAME
24
25
25
-
* Replace `[YOUR_BUCKET_NAME]` with the name of your Cloud Storage Bucket.
26
+
* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.
26
27
27
28
1. Ensure the Cloud Datastore API is enabled:
28
29
29
30
[Click here to enable the Cloud Datastore API](https://console.cloud.google.com/flows/enableapi?apiid=datastore.googleapis.com&redirect=https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/functions/datastore)
30
31
31
-
1. Deploy the "ds-get" function with an HTTP trigger:
32
+
1. Deploy the "get" function with an HTTP trigger:
32
33
33
-
gcloud alpha functions deploy ds-get --bucket [YOUR_BUCKET_NAME] --trigger-http --entry-point get
34
+
gcloud alpha functions deploy get --stage-bucket YOUR_BUCKET_NAME --trigger-http
34
35
35
-
* Replace `[YOUR_BUCKET_NAME]` with the name of your Cloud Storage Bucket.
36
+
* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.
36
37
37
-
1. Deploy the "ds-set" function with an HTTP trigger:
38
+
1. Deploy the "set" function with an HTTP trigger:
38
39
39
-
gcloud alpha functions deploy ds-set --bucket [YOUR_BUCKET_NAME] --trigger-http --entry-point set
40
+
gcloud alpha functions deploy set --stage-bucket YOUR_BUCKET_NAME --trigger-http
40
41
41
-
* Replace `[YOUR_BUCKET_NAME]` with the name of your Cloud Storage Bucket.
42
+
* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.
42
43
43
-
1. Deploy the "ds-del" function with an HTTP trigger:
44
+
1. Deploy the "del" function with an HTTP trigger:
44
45
45
-
gcloud alpha functions deploy ds-del --bucket [YOUR_BUCKET_NAME] --trigger-http --entry-point del
46
+
gcloud alpha functions deploy del --stage-bucket YOUR_BUCKET_NAME --trigger-http
46
47
47
-
* Replace `[YOUR_BUCKET_NAME]` with the name of your Cloud Storage Bucket.
48
+
* Replace `YOUR_BUCKET_NAME` with the name of your Cloud Storage Bucket.
48
49
49
-
1. Call the "ds-set" function to create a new entity:
50
+
1. Call the "set" function to create a new entity:
0 commit comments