This repository holds Node.js samples used throughout cloud.google.com.
- Google App Engine
- Google BigQuery
- Google Compute Engine
- Google Cloud Functions
- Google Cloud Logging
- Google Cloud Pub/Sub
- Google Cloud Storage
- Google Prediction API
- Other Example Apps
- More Information
- Contributing
- License
This is a collection of samples and instructions to run common nodejs frameworks and applications on Google App Engine.
Google (Cloud) Products
- Google Analytics - Source code
- Google Cloud Logging - Source code
- Google Cloud Pub/Sub - Source code
- Google Cloud Storage - Source code
Frameworks
- Express.js - Source code | App Engine Tutorial | Live demo | Documentation
- Express.js + Memcached Sessions - Source code | Documentation
- Geddy.js - Source code | App Engine Tutorial | Live demo | Documentation
- Hapi.js - Source code | App Engine Tutorial | Live demo | Documentation
- Loopback.js - Source code | App Engine Tutorial | Live demo | Documentation
- Koa.js - Source code | App Engine Tutorial | Live demo | Documentation
- Kraken.js - Source code | App Engine Tutorial | Live demo | Documentation
- Parse-server - Source code
- Restify.js - Source code | App Engine Tutorial | Live demo | Documentation
- Sails.js - Source code | App Engine Tutorial | Live demo | Documentation
Databases
- Google Cloud Datastore - Source code
- Google Cloud SQL - Source code
- Memcached - Source code
- MongoDB - Source code | App Engine Tutorial | Documentation
- Redis - Source code | App Engine Tutorial | Documentation
Tools
- gcloud-node - Source code | Documentation
- Bower - Source code | App Engine Tutorial | Documentation
- Grunt - Source code | App Engine Tutorial | Live demo | Documentation
- Mailgun - Source code | App Engine Tutorial | Documentation
- Sendgrid - Source code | App Engine Tutorial | Documentation
- Twilio - Source code
- Webpack - Source code | App Engine Tutorial | Documentation
- WebSockets - Source code
Other Examples
- Express.js Hello World - Source code
- Extending the runtime - Source code
- Reading/writing from/to disk - Source code
- Serving static files - Source code
- Query sample - Source code | Documentation
- Dataset size sample - Source code
- Load from file sample - Source code | Documentation
- Load from GCS sample - Source code | Documentation
- Sendgrid sample - Source code | Documentation
- VMs sample - Source code | Documentation
- Tasks sample - Source code | Documentation
- Samples - Source code | Documentation
- Reading logs sample - Source code | Documentation
- Writing logs sample - Source code | Documentation
- Exporting logs sample - Source code | Documentation
- Subscriber/Publisher sample - Source code | Documentation
- IAM sample - Source code | Documentation
- Auth sample - Source code | Documentation
- Hosted Models sample - Source code | Documentation
- nodejs-getting-started - Source code | App Engine Tutorial 1 | App Engine Tutorial 2
- gcloud-node-todos - Source code
- gitnpm - Source code
- gcloud-kvstore - Source code
- Getting started with nodejs on Google Cloud
- See our other Google Cloud Platform github repos for sample applications and scaffolding for other frameworks and use cases.
- Using the
gcloud
npm module - Logging to Google Cloud with Winston
Contributions welcome!
See CONTRIBUTING.md
git clone [email protected]:GoogleCloudPlatform/nodejs-docs-samples.git
cd nodejs-docs-samples
npm install
- Start Redis
- Start Memcached
- Set the
GCLOUD_PROJECT
environment variable to id of your project - Set the
TEST_BUCKET_NAME
environment variable to the name of a test Google Cloud Storage bucket. - Set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path to a service account file. You can download one from your Google project's "permissions" page. npm test
Since the tests use AVA, you can use the
--match
option to run only the tests that match a provided pattern.
Run only the tests that match a pattern:
npm test -- -- --match="<pattern>"
Only run the tests for the datastore
sample:
npm test -- -- --match="datastore"
Skip the tests that match a pattern:
npm test -- -- --match="!<pattern>"
Run all but the datastore
tests:
npm test -- -- --match="!datastore"
Skip the tests that require Redis and Memcached:
npm test -- -- --match="express-memcached-session|redis"
Apache Version 2.0
See LICENSE