1
1
# Google Cloud Platform NodeJS Samples
2
2
3
- This repository holds the samples used in the nodejs documentation on
4
- [ cloud.google.com/nodejs] ( https://cloud.google.com/nodejs ) .
3
+ This repository holds Node.js samples used throught [ cloud.google.com] ( ) .
5
4
6
5
[ ![ Build Status] ( https://travis-ci.org/GoogleCloudPlatform/nodejs-docs-samples.svg )] ( https://travis-ci.org/GoogleCloudPlatform/nodejs-docs-samples )
7
6
7
+ ## Table of Contents
8
+
9
+ * [ Google App Engine] ( #google-app-engine )
10
+ * [ Google Cloud Logging] ( #google-cloud-logging )
11
+ * [ Google Cloud Storage] ( #google-cloud-storage )
12
+ * [ Google Prediction API] ( #google-prediction-api )
13
+ * [ Other Example Apps] ( #other-example-apps )
14
+ * [ More Information] ( #more-information )
15
+ * [ Contributing] ( #contributing )
16
+ * [ License] ( #license )
17
+
8
18
## Google App Engine
9
19
10
20
This is a collection of samples and instructions to run common nodejs frameworks
11
21
and applications on [ Google App Engine] ( http://cloud.google.com/nodejs ) .
12
22
13
- ### Frameworks
23
+ __ Google (Cloud) Products__
24
+
25
+ - Google Analytics - [ Source code] [ aeanalytics_1 ]
26
+ - Google Cloud Logging - [ Source code] [ aelogging_1 ]
27
+ - Google Cloud Pub/Sub - [ Source code] [ aepubsub_1 ]
28
+ - Google Cloud Storage - [ Source code] [ aestorage_1 ]
29
+
30
+ __ Frameworks__
14
31
15
32
- Express.js - [ Source code] [ express_1 ] | [ App Engine Tutorial] [ express_2 ] | [ Live demo] [ express_3 ] | [ Documentation] [ express_4 ]
16
33
- Express.js + Memcached Sessions - [ Source code] [ express_5 ] | [ Documentation] [ express_6 ]
@@ -22,25 +39,37 @@ and applications on [Google App Engine](http://cloud.google.com/nodejs).
22
39
- Restify.js - [ Source code] [ restify_1 ] | [ App Engine Tutorial] [ restify_2 ] | [ Live demo] [ restify_3 ] | [ Documentation] [ restify_4 ]
23
40
- Sails.js - [ Source code] [ sails_1 ] | [ App Engine Tutorial] [ sails_2 ] | [ Live demo] [ sails_3 ] | [ Documentation] [ sails_4 ]
24
41
25
- ### Databases
42
+ __ Databases __
26
43
44
+ - Google Cloud Datastore - [ Source code] [ aedatastore_1 ]
45
+ - Google Cloud SQL - [ Source code] [ aecloudsql_1 ]
46
+ - Memcached - [ Source code] [ memcached_1 ]
27
47
- MongoDB - [ Source code] [ mongodb_1 ] | [ App Engine Tutorial] [ mongodb_2 ] | [ Documentation] [ mongodb_3 ]
28
48
- Redis - [ Source code] [ redis_1 ] | [ App Engine Tutorial] [ redis_2 ] | [ Documentation] [ redis_3 ]
29
49
30
- ### Tools
50
+ __ Tools __
31
51
32
52
- gcloud-node - [ Source code] [ gcloud_1 ] | [ Documentation] [ gcloud_2 ]
33
53
- Bower - [ Source code] [ bower_1 ] | [ App Engine Tutorial] [ bower_2 ] | [ Documentation] [ bower_3 ]
34
54
- Grunt - [ Source code] [ grunt_1 ] | [ App Engine Tutorial] [ grunt_2 ] | [ Live demo] [ grunt_3 ] | [ Documentation] [ grunt_4 ]
35
55
- Mailgun - [ Source code] [ mailgun_1 ] | [ App Engine Tutorial] [ mailgun_2 ] | [ Documentation] [ mailgun_3 ]
36
56
- Sendgrid - [ Source code] [ sendgrid_1 ] | [ App Engine Tutorial] [ sendgrid_2 ] | [ Documentation] [ sendgrid_3 ]
57
+ - Twilio - [ Source code] [ twilio_1 ]
37
58
- Webpack - [ Source code] [ webpack_1 ] | [ App Engine Tutorial] [ webpack_2 ] | [ Documentation] [ webpack_3 ]
59
+ - WebSockets - [ Source code] [ websockets_1 ]
60
+
61
+ __ Other Examples__
62
+
63
+ - Express.js Hello World - [ Source code] [ expresshw_1 ]
64
+ - Extending the runtime - [ Source code] [ aeextending_1 ]
65
+ - Reading/writing from/to disk - [ Source code] [ aedisk_1 ]
66
+ - Serving static files - [ Source code] [ aestaticfiles_1 ]
38
67
39
68
## Google Storage
40
69
41
70
- Auth sample - [ Source code] [ storage_1 ] | [ Google Cloud Docs] [ storage_2 ]
42
71
43
- ## Example Apps
72
+ ## Other Example Apps
44
73
45
74
- nodejs-getting-started - [ Source code] [ nodejs_1 ] | [ App Engine Tutorial 1] [ nodejs_2 ] | [ App Engine Tutorial 2] [ nodejs_3 ]
46
75
- gcloud-node-todos - [ Source code] [ todos_1 ]
@@ -54,7 +83,7 @@ and applications on [Google App Engine](http://cloud.google.com/nodejs).
54
83
- [ Using the ` gcloud ` npm module] ( https://googlecloudplatform.github.io/gcloud-node/#/ )
55
84
- [ Logging to Google Cloud with Winston] ( https://github.com/GoogleCloudPlatform/winston-gae )
56
85
57
- ## Contributing changes
86
+ ## Contributing
58
87
59
88
Contributions welcome!
60
89
@@ -68,6 +97,9 @@ See [CONTRIBUTING.md](https://github.com/GoogleCloudPlatform/nodejs-docs-samples
68
97
1 . Start Redis
69
98
1 . Start Memcached
70
99
1 . Set the ` TEST_PROJECT_ID ` environment variable to id of your project
100
+ 1 . Set the ` GOOGLE_APPLICATION_CREDENTIALS ` environment variable to the path to
101
+ a service account file. You can download one from your Google project's
102
+ "permissions" page.
71
103
1 . ` npm test `
72
104
73
105
Since the tests use [ Mocha.js] ( https://mochajs.org/ ) , you can use the ` --grep `
@@ -77,40 +109,35 @@ option causes the matched tests to be excluded instead of included.
77
109
__ Run only the tests that match a pattern:__
78
110
79
111
80
- ```
81
- npm test -- -- --grep <pattern>
82
- ```
112
+ npm test -- -- --grep <pattern>
83
113
84
114
__ Only run the tests for the ` datastore ` sample:__
85
115
86
- ```
87
- npm test -- -- --grep datastore
88
- ```
116
+ npm test -- -- --grep datastore
89
117
90
118
__ Skip the tests that match a pattern:__
91
119
92
- ```
93
- npm test -- -- --grep <pattern> --invert
94
- ```
120
+ npm test -- -- --grep <pattern> --invert
95
121
96
122
__ Run all but the ` datastore ` tests:__
97
123
98
- ```
99
- npm test -- -- --grep datastore --invert
100
- ```
124
+ npm test -- -- --grep datastore --invert
101
125
102
126
__ Skip the tests that require Redis and Memcached:__
103
127
104
- ```
105
- npm test -- -- --grep "express-memcached-session|redis" --invert
106
- ```
128
+ npm test -- -- --grep "express-memcached-session|redis" --invert
107
129
108
- ## Licensing
130
+ ## License
109
131
110
132
Apache Version 2.0
111
133
112
134
See [ LICENSE] ( https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/LICENSE )
113
135
136
+ [ aeanalytics_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/analytics
137
+ [ aelogging_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/logging
138
+ [ aepubsub_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/pubsub
139
+ [ aestorage_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/storage
140
+
114
141
[ storage_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/storage/authSample.js
115
142
[ storage_2 ] : https://cloud.google.com/storage/docs/authentication#acd-examples
116
143
@@ -156,6 +183,10 @@ See [LICENSE](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/ma
156
183
[ sails_3 ] : http://sails-dot-nodejs-docs-samples.appspot.com
157
184
[ sails_4 ] : http://sailsjs.org/
158
185
186
+ [ aedatastore_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/datastore
187
+ [ aecloudsql_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/cloudsql
188
+ [ memcached_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/memcached
189
+
159
190
[ mongodb_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/mongodb
160
191
[ mongodb_2 ] : https://cloud.google.com/nodejs/resources/databases/mongo
161
192
[ mongodb_3 ] : https://docs.mongodb.org/
@@ -184,10 +215,19 @@ See [LICENSE](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/ma
184
215
[ sendgrid_2 ] : https://cloud.google.com/nodejs/resources/tools/sendgrid
185
216
[ sendgrid_3 ] : http://sendgrid.com/
186
217
218
+ [ twilio_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/twilio
219
+
187
220
[ webpack_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/webpack
188
221
[ webpack_2 ] : https://cloud.google.com/nodejs/resources/tools/webpack
189
222
[ webpack_3 ] : https://webpack.github.io/
190
223
224
+ [ websockets_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/websockets
225
+
226
+ [ expresshw_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/hello-world
227
+ [ aedisk_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/disk
228
+ [ aeextending_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/extending-runtime
229
+ [ aestaticfiles_1 ] : https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/appengine/static-files
230
+
191
231
[ nodejs_1 ] : https://github.com/GoogleCloudPlatform/nodejs-getting-started
192
232
[ nodejs_2 ] : https://cloud.google.com/nodejs/getting-started/hello-world
193
233
[ nodejs_3 ] : https://cloud.google.com/nodejs/getting-started/tutorial-app
0 commit comments