Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Node.js: Cloud Functions - hello-http

An HTTP triggered Node.js Cloud Functions template.

Test locally

Install dependencies:

npm install

Run the function:

npm start

...
Serving function...
Function: helloHttp
Signature type: http
URL: http://localhost:8080/

Inside the scripts folder, run test_local.sh to test the function locally:

./test_local.sh

Hello World!

Before deploying to Google Cloud

Run setup.sh to enable required services:

./setup.sh

Deploy to Google Cloud

Run deploy.sh to deploy to Google Cloud:

./deploy.sh

Test in Google Cloud

You can test with Invoke function via HTTP in Cloud Code or with gcloud.

Run test_cloud.sh to test the function in Google Cloud:

./test_cloud.sh

Cleanup

When you're done, you can cleanup created resources:

./cleanup.sh