To deploy a "hello world" function to Google Cloud Functions:
index.tsx45 chars3 lines
npm
:index.tsx12 chars2 lines
index.tsx36 chars2 lines
index.js
and add the following code to it:index.tsx69 chars4 lines
This defines an HTTP-triggered function that responds with "Hello, World!" when it is called.
package.json
file that specifies the name of your function and its entry point:78 chars6 lines
index.tsx69 chars2 lines
This command deploys your helloWorld
function to Google Cloud Functions with the nodejs12
runtime and an HTTP trigger. You should see a message indicating that your function was successfully deployed, along with its URL.
index.tsx25 chars2 lines
This should return a response of "Hello, World!".
Congratulations, you've deployed your first Cloud Function!
gistlibby LogSnag