Skip to content

Commit

Permalink
Merge pull request #118 from GoogleCloudPlatform/readme
Browse files Browse the repository at this point in the history
Re-organized readme files.
  • Loading branch information
jmdobry committed May 25, 2016
2 parents 37c7cd6 + 17f337f commit 8b19db4
Show file tree
Hide file tree
Showing 26 changed files with 1,025 additions and 482 deletions.
512 changes: 270 additions & 242 deletions README.md

Large diffs are not rendered by default.

145 changes: 144 additions & 1 deletion appengine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,147 @@ create a project/app id. (App id and project id are identical.)

gcloud preview app deploy

1. Awesome! Your application is now live at `your-app-id.appspot.com`.
1. Awesome! Your application is now live at `your-project-id.appspot.com`.


## Samples

__Google (Cloud) Products__

- Google Analytics - [Source code][aeanalytics_1]
- Google Cloud Logging - [Source code][aelogging_1]
- Google Cloud Pub/Sub - [Source code][aepubsub_1]
- Google Cloud Storage - [Source code][aestorage_1]

__Frameworks__

- Express.js - [Source code][express_1] | [App Engine Tutorial][express_2] | [Live demo][express_3] | [Documentation][express_4]
- Express.js + Memcached Sessions - [Source code][express_5] | [Documentation][express_6]
- Geddy.js - [Source code][geddy_1] | [App Engine Tutorial][geddy_2] | [Live demo][geddy_3] | [Documentation][geddy_4]
- Hapi.js - [Source code][hapi_1] | [App Engine Tutorial][hapi_2] | [Live demo][hapi_3] | [Documentation][hapi_4]
- Loopback.js - [Source code][loopback_1] | [App Engine Tutorial][loopback_2] | [Live demo][loopback_3] | [Documentation][loopback_4]
- Koa.js - [Source code][koa_1] | [App Engine Tutorial][koa_2] | [Live demo][koa_3] | [Documentation][koa_4]
- Kraken.js - [Source code][kraken_1] | [App Engine Tutorial][kraken_2] | [Live demo][kraken_3] | [Documentation][kraken_4]
- Parse-server - [Source code][parse_1]
- Restify.js - [Source code][restify_1] | [App Engine Tutorial][restify_2] | [Live demo][restify_3] | [Documentation][restify_4]
- Sails.js - [Source code][sails_1] | [App Engine Tutorial][sails_2] | [Live demo][sails_3] | [Documentation][sails_4]

__Databases__

- Google Cloud Datastore - [Source code][aedatastore_1]
- Google Cloud SQL - [Source code][aecloudsql_1]
- Memcached - [Source code][memcached_1]
- MongoDB - [Source code][mongodb_1] | [App Engine Tutorial][mongodb_2] | [Documentation][mongodb_3]
- Redis - [Source code][redis_1] | [App Engine Tutorial][redis_2] | [Documentation][redis_3]

__Tools__

- gcloud-node - [Source code][gcloud_1] | [Documentation][gcloud_2]
- Bower - [Source code][bower_1] | [App Engine Tutorial][bower_2] | [Documentation][bower_3]
- Grunt - [Source code][grunt_1] | [App Engine Tutorial][grunt_2] | [Live demo][grunt_3] | [Documentation][grunt_4]
- Mailgun - [Source code][mailgun_1] | [App Engine Tutorial][mailgun_2] | [Documentation][mailgun_3]
- Sendgrid - [Source code][sendgrid_1] | [App Engine Tutorial][sendgrid_2] | [Documentation][sendgrid_3]
- Twilio - [Source code][twilio_1]
- Webpack - [Source code][webpack_1] | [App Engine Tutorial][webpack_2] | [Documentation][webpack_3]
- WebSockets - [Source code][websockets_1]

__Other Examples__

- Express.js Hello World - [Source code][expresshw_1]
- Extending the runtime - [Source code][aeextending_1]
- Reading/writing from/to disk - [Source code][aedisk_1]
- Serving static files - [Source code][aestaticfiles_1]

[aeanalytics_1]: analytics
[aelogging_1]: logging
[aepubsub_1]: pubsub
[aestorage_1]: storage

[express_1]: express
[express_2]: https://cloud.google.com/nodejs/resources/frameworks/express
[express_3]: http://express-dot-nodejs-docs-samples.appspot.com
[express_4]: http://expressjs.com/
[express_5]: express-memcached-session
[express_6]: https://github.com/balor/connect-memcached

[geddy_1]: geddy
[geddy_2]: https://cloud.google.com/nodejs/resources/frameworks/geddy
[geddy_3]: http://geddy-dot-nodejs-docs-samples.appspot.com
[geddy_4]: http://geddyjs.org/

[hapi_1]: hapi
[hapi_2]: https://cloud.google.com/nodejs/resources/frameworks/hapi
[hapi_3]: http://hapi-dot-nodejs-docs-samples.appspot.com
[hapi_4]: http://hapijs.com/

[loopback_1]: loopback
[loopback_2]: https://cloud.google.com/nodejs/resources/frameworks/loopback
[loopback_3]: http://loopback-dot-nodejs-docs-samples.appspot.com
[loopback_4]: http://loopback.io/

[koa_1]: koa
[koa_2]: https://cloud.google.com/nodejs/resources/frameworks/koa
[koa_3]: http://koa-dot-nodejs-docs-samples.appspot.com
[koa_4]: http://koajs.com/

[kraken_1]: kraken
[kraken_2]: https://cloud.google.com/nodejs/resources/frameworks/kraken
[kraken_3]: http://kraken-dot-nodejs-docs-samples.appspot.com
[kraken_4]: http://krakenjs.com/

[parse_1]: parse-server

[restify_1]: restify
[restify_2]: https://cloud.google.com/nodejs/resources/frameworks/restify
[restify_3]: http://restify-dot-nodejs-docs-samples.appspot.com
[restify_4]: http://restify.com/

[sails_1]: sails
[sails_2]: https://cloud.google.com/nodejs/resources/frameworks/sails
[sails_3]: http://sails-dot-nodejs-docs-samples.appspot.com
[sails_4]: http://sailsjs.org/

[aedatastore_1]: datastore
[aecloudsql_1]: cloudsql
[memcached_1]: memcached

[mongodb_1]: mongodb
[mongodb_2]: https://cloud.google.com/nodejs/resources/databases/mongodb
[mongodb_3]: https://docs.mongodb.org/

[redis_1]: redis
[redis_2]: https://cloud.google.com/nodejs/resources/databases/redis
[redis_3]: https://redis.io/

[gcloud_1]: https://github.com/GoogleCloudPlatform/gcloud-node
[gcloud_2]: https://googlecloudplatform.github.io/gcloud-node/#/

[bower_1]: bower
[bower_2]: https://cloud.google.com/nodejs/resources/tools/bower
[bower_3]: http://bower.io/

[grunt_1]: grunt
[grunt_2]: https://cloud.google.com/nodejs/resources/tools/grunt
[grunt_3]: http://grunt-dot-nodejs-docs-samples.appspot.com
[grunt_4]: http://gruntjs.com/

[mailgun_1]: mailgun
[mailgun_2]: https://cloud.google.com/nodejs/resources/tools/mailgun
[mailgun_3]: http://www.mailgun.com/

[sendgrid_1]: sendgrid
[sendgrid_2]: https://cloud.google.com/nodejs/resources/tools/sendgrid
[sendgrid_3]: http://sendgrid.com/

[twilio_1]: twilio

[webpack_1]: webpack
[webpack_2]: https://cloud.google.com/nodejs/resources/tools/webpack
[webpack_3]: https://webpack.github.io/

[websockets_1]: websockets

[expresshw_1]: hello-world
[aedisk_1]: disk
[aeextending_1]: extending-runtime
[aestaticfiles_1]: static-files
81 changes: 62 additions & 19 deletions bigquery/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,84 @@
## BigQuery Samples
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

These samples require two environment variables to be set:
# Google BigQuery Node.js Samples

- `GOOGLE_APPLICATION_CREDENTIALS` - Path to a service account file. You can
download one from your Google project's "permissions" page.
- `GCLOUD_PROJECT` - Id of your Google project.
[BigQuery][bigquery_docs] is Google's fully managed, petabyte scale, low cost
analytics data warehouse.

## Run the samples
[bigquery_docs]: https://cloud.google.com/bigquery/docs/

Install dependencies:
## Table of Contents

npm install
* [Setup](#setup)
* [Samples](#samples)
* [Create A Simple Application With the API](#create-a-simple-application-with-the-api)
* [Calculate size of dataset](#calculate-size-of-dataset)
* [Loading Data with a POST Request](#loading-data-with-a-post-request)
* [Loading Data from Cloud Storage](#loading-data-from-cloud-storage)

### getting_started.js
## Setup

npm run getting_started
1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:

### dataset_size.js
npm install

Usage: `npm run dataset_size -- <projectId> <datasetId>`
[prereq]: ../README.md#prerequisities
[run]: ../README.md#how-to-run-a-sample

## Samples

### Create A Simple Application With the API

View the [documentation][basics_docs] or the [source code][basics_code].

__Run the sample:__

node getting_started

[basics_docs]: https://cloud.google.com/bigquery/create-simple-app-api
[basics_code]: getting_started.js

### Calculate size of dataset

View the [source code][size_code].

__Run the sample:__

Usage: `node dataset_size <projectId> <datasetId>`

Example:

npm run dataset_size -- bigquery-public-data hacker_news
node dataset_size bigquery-public-data hacker_news

[size_code]: dataset_size.js

### Loading Data with a POST Request

View the [documentation][file_docs] or the [source code][file_code].

### load_data_from_csv.js
__Run the sample:__

Usage: `npm run load_data_from_csv -- <path-to-file> <dataset-id> <table-name>`
Usage: `node load_data_from_csv <path-to-file> <dataset-id> <table-name>`

Example:

npm run load_data_from_csv -- data.csv my-dataset my-table
node load_data_from_csv resources/data.csv my-dataset my-table

### load_data_from_gcs.js
[file_docs]: https://cloud.google.com/bigquery/loading-data-post-request
[file_code]: load_data_from_csv.js

Usage: `npm run load_data_from_gcs -- <bucket-name> <filename> <dataset-id> <table-name>`
### Loading Data from Cloud Storage

View the [documentation][gcs_docs] or the [source code][gcs_code].

__Run the sample:__

Usage: `node load_data_from_gcs <bucket-name> <filename> <dataset-id> <table-name>`

Example:

npm run load_data_from_gcs -- my-bucket data.csv my-dataset my-table
node load_data_from_gcs my-bucket data.csv my-dataset my-table

[gcs_docs]: https://cloud.google.com/bigquery/docs/loading-data-cloud-storage
[gcs_code]: load_data_from_gcs.js
96 changes: 77 additions & 19 deletions computeengine/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,93 @@
## Compute Engine Samples
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

These samples require two environment variables to be set:
# Google Compute Engine Node.js Samples

- `GOOGLE_APPLICATION_CREDENTIALS` - Path to a service account file. You can
download one from your Google project's "permissions" page.
- `GCLOUD_PROJECT` - Id of your Google project.
[Compute Engine][compute_docs] lets you create and run virtual machines on
Google infrastructure.

## Run the samples
[compute_docs]: https://cloud.google.com/compute/docs/

Install dependencies:
## Table of Contents

npm install
* [Setup](#setup)
* [Samples](#samples)
* [Sending mail with Sendgrid](#sending-mail-with-sendgrid)
* [Sending mail with Mailjet](#sending-mail-with-mailjet)
* [Listing instances (recommended)](#listing-instances-recommended)
* [Listing instances](#listing-instances)

### sendgrid.js
## Setup

Requires a `SENDGRID_API_KEY` environment variable to be set.
1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:

npm run sendgrid
npm install

### mailjet.js
[prereq]: ../README.md#prerequisities
[run]: ../README.md#how-to-run-a-sample

Requires `MAILJET_API_KEY` and `MAILJET_API_SECRET` environment variables to be
set.
## Samples

npm run mailjet
### Sending mail with Sendgrid

### vms.js
View the [documentation][sendgrid_docs] or the [source code][sendgrid_code].

npm run vms
__Run the sample:__

### vms_api.js
1. Set the `SENDGRID_API_KEY` environment variable:

npm run vms_api
export SENDGRID_API_KEY=<your-sendgrid-api-key>

1. Start the server:

node sendgrid

1. Open http://localhost:8080 in your browser

[sendgrid_docs]: https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid
[sendgrid_code]: sendgrid.js

### Sending mail with Mailjet

View the [documentation][mailjet_docs] or the [source code][mailjet_code].

__Run the sample:__

1. Set the `MAILJET_API_KEY` environment variable:

export MAILJET_API_KEY=<your-mailjet-api-key>

1. Set the `MAILJET_API_SECRET` environment variable:

export MAILJET_API_SECRET=<your-mailjet-api-secret>

1. Start the server:

node mailjet

1. Open http://localhost:8080 in your browser

[mailjet_docs]: https://cloud.google.com/compute/docs/tutorials/sending-mail/using-mailjet
[mailjet_code]: mailjet.js

### Listing instances (recommended)

View the [documentation][vms_docs] or the [source code][vms_code].

__Run the sample:__

node vms

[vms_docs]: https://cloud.google.com/compute/docs/tutorials/nodejs-guide
[vms_code]: vms.js

### Listing instances

View the [documentation][vms_api_docs] or the [source code][vms_api_code].

__Run the sample:__

node vms_api

[vms_api_docs]: https://cloud.google.com/compute/docs/tutorials/nodejs-guide
[vms_api_code]: vms_api.js
6 changes: 0 additions & 6 deletions computeengine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
"engines": {
"node": ">=0.10.x"
},
"scripts": {
"sendgrid": "node sendgrid.js",
"mailjet": "node mailjet.js",
"vms": "node vms.js",
"vms_api": "node vms_api.js"
},
"dependencies": {
"gcloud": "^0.34.0",
"googleapis": "^7.1.0",
Expand Down
Loading

0 comments on commit 8b19db4

Please sign in to comment.