Node.js samples for Google Cloud Platform products.
See cloud.google.com/nodejs to get up and running with Node.js on Google Cloud Platform.
Google Cloud Samples
To browse ready to use code samples check Google Cloud Samples.
Install Node.js version 10 or greater
Clone this repository:
git clone https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git
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
Change directory to one of the sample folders, e.g.
Install the sample's dependencies (see the sample's README for details):
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.
Contributions welcome! See the Contributing Guide.