Nodejs Docs Samples

Node.js samples for Google Cloud Platform products.

Google Cloud Platform logo

Google Cloud Platform Node.js Samples [![Slack][slack_badge]][slack_link]

Node.js samples for [Google Cloud Platform products][cloud].

See [][cloud_nodejs] to get up and running with Node.js on Google Cloud Platform.

[slack_badge]: [slack_link]: [cloud]: [cloud_nodejs]:



  1. Install Node.js version 10 or greater

  2. Clone this repository:

     git clone
  3. Obtain authentication credentials.

    Create local credentials by running the following command and following the oauth2 flow (read more about the command here):

     gcloud auth application-default login

    Read more about Google Cloud Platform Authentication.

How to run a sample

  1. Change directory to one of the sample folders, e.g. datastore:

     cd datastore/
  2. Install the sample's dependencies (see the sample's README for details):

     npm install
  3. Run the sample:

     node sample_file.js [args]...

Other sample applications

Bookshelf tutorial app

The Bookshelf app is a sample web app written in Node.js that shows you how to use a variety of Google Cloud Platform features.

View the tutorial or the source code.

Node.js Codelab

In the Node.js Web App Google Cloud Platform codelab, you learn how to integrate Google Cloud Platform services into a Node.js web application to store data, upload images, and authenticate users.

View the tutorial or the source code.


Contributions welcome! See the Contributing Guide.

Open Issues
Last Commit
6 days ago