This repository holds Node.js samples used throughout cloud.google.com.
- Google App Engine
- 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
- Tasks sample - 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
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 Mocha.js, you can use the --grep
option to run only the tests that match a provided pattern. The --invert
option causes the matched tests to be excluded instead of included.
Run only the tests that match a pattern:
npm test -- -- --grep <pattern>
Only run the tests for the datastore
sample:
npm test -- -- --grep datastore
Skip the tests that match a pattern:
npm test -- -- --grep <pattern> --invert
Run all but the datastore
tests:
npm test -- -- --grep datastore --invert
Skip the tests that require Redis and Memcached:
npm test -- -- --grep "express-memcached-session|redis" --invert
Apache Version 2.0
See LICENSE