Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions examples/with-gcp/.gcloudignore

This file was deleted.

12 changes: 10 additions & 2 deletions examples/with-gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,22 @@ Deploy the GCP function (cd examples/with-gcp)
--entry-point=handler \
--runtime nodejs20 \
--trigger-http \
--no-allow-unauthenticated \
--allow-unauthenticated \
--project [PROJECT ID]

access the URL (example): https://us-central1-zinc-style-449212-s0.cloudfunctions.net/gcp-function

## Authenticate for invocation

Since authentication is required, clicking the URL will return Error: Forbidden. Execute this line:
If authentication is required (--no-allow-unauthenticated), execute this line:

$ curl -H "Authorization: Bearer $(gcloud auth print-identity-token)" \
[FUNCTION URL]

more info: https://cloud.google.com/functions/docs/securing/authenticating

To invoke the GCP function directly, execute this line:

$ gcloud functions call [FUNCTION NAME]

more info: https://cloud.google.com/functions/docs/running/direct
2 changes: 1 addition & 1 deletion examples/with-gcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@google-cloud/functions-framework": "^3.4.5",
"@stackpress/ingest": "0.3.28"
"@stackpress/ingest": "0.3.30"
},
"devDependencies": {
"@types/node": "22.9.3",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1653,19 +1653,19 @@
"@smithy/types" "^4.1.0"
tslib "^2.6.2"

"@stackpress/ingest@0.3.28":
version "0.3.28"
resolved "https://registry.yarnpkg.com/@stackpress/ingest/-/ingest-0.3.28.tgz#fa9b61a52a61a6ec276181e7a73f763b55c65994"
integrity sha512-7BCg8PYOO6aTrMI/TLUDiub1PS7R6hZvrqbvlxk77Y/Bql/EOKZUe1SjuRJ1CHMNee+FDCpcZTXBIwTSDJNGhQ==
"@stackpress/ingest@0.3.30":
version "0.3.30"
resolved "https://registry.npmjs.org/@stackpress/ingest/-/ingest-0.3.30.tgz#5bff67871b19733141b53171b1a6c660c27e300a"
integrity sha512-M+SdQuC6HtxYhLt568O9KVnngaywxMgrhy2kpGL9zOYdfvtDUiYTCQojr6+G018TAek03uWK7i3zpaYtkv4DZA==
dependencies:
"@stackpress/lib" "0.3.28"
"@stackpress/lib" "0.3.30"
"@whatwg-node/server" "0.6.7"
cookie "1.0.2"

"@stackpress/lib@0.3.28":
version "0.3.28"
resolved "https://registry.yarnpkg.com/@stackpress/lib/-/lib-0.3.28.tgz#b1c5249d02b11860d1bffe7ac749f89baead4a0a"
integrity sha512-9WqKWUwL/f90d61AuCjo6/vdCqDHr74Kz3184tdoolpmxAFNa9La9JULR2/qoew8yEMo90JM7mZPIU4BPBRMrQ==
"@stackpress/lib@0.3.30":
version "0.3.30"
resolved "https://registry.npmjs.org/@stackpress/lib/-/lib-0.3.30.tgz#a31aac974df62a5c991346e50f7abcbc067754b3"
integrity sha512-aUuhYxrftwL3CL6nh3knMNCAPjKdOudBgwHCiKQDf7Q/p1ZoTc/iVZ3SXthNDUmsilpgfsjXKipe5jmpD+KK5g==
dependencies:
"@inquirer/prompts" "7.1.0"

Expand Down