These are samples for using Node.js on Google App Engine Managed VMs. These samples are referenced from the docs.
See our other Google Cloud Platform github repos for sample applications and scaffolding for other frameworks and use cases.
Some samples have specific instructions. If there is a README in the sample folder, please refer to it for any additional steps required to run the sample.
In general, the samples typically require:
-
Install the Google Cloud SDK, including the gcloud tool, and gcloud app component.
-
Setup the gcloud tool. This provides authentication to Google Cloud APIs and services.
gcloud init
-
Clone this repo.
git clone https://github.com/GoogleCloudPlatform/<REPO NAME>.git
-
Open a sample folder, install dependencies, and run the sample:
cd <sample-folder>/ npm install npm start
-
Visit the application at http://localhost:8080.
Some samples in this repositories may have special deployment instructions. Refer to the README file in the sample folder.
-
Use the Google Developers Console to create a project/app id. (App id and project id are identical.)
-
Setup the gcloud tool, if you haven't already.
gcloud init
-
Use gcloud to deploy your app.
gcloud app deploy
-
Awesome! Your application is now live at
your-project-id.appspot.com
.
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