See above how to develop and deploy to GCP Http Functions.
First, install the libraries with:
npm i
Then, to test locally, run:
npm run start:debug
To deploy to GCP, first change the config
variables inside package.json
.
gcp_project
: The name of this project, configured ingcloud init
.gcp_region
: The region where your function is located.gcp_runtime
: The runtime of the function.gcp_entrypoint
: The name of the exposed function (should be the same atindex.ts
).
So, you must run:
npm run deploy
Still have questions? See more