You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, install <code>gcloud</code> with npm and require it into your project:
27
-
</p>
28
-
<divhljs>$ npm install --save gcloud</div>
29
-
<divhljs>var gcloud = require('gcloud');</div>
30
-
<p>
31
-
There are a couple of ways to use the <code>gcloud</code> module.
32
-
</p>
33
-
<p>
34
-
If you are running your app on Google App Engine or Google Compute Engine, you won't need to worry about supplying connection configuration options to <code>gcloud</code>— we figure that out for you.
35
-
</p>
36
-
<p>
37
-
However, if you're running your app elsewhere, you will need to provide this information.
First, install <code>gcloud</code> with npm and require it into your project:
37
+
</p>
38
+
<divhljs>$ npm install --save gcloud</div>
39
+
<divhljs>var gcloud = require('gcloud');</div>
40
+
<p>
41
+
There are a couple of ways to use the <code>gcloud</code> module.
42
+
</p>
43
+
<p>
44
+
If you are running your app on Google App Engine or Google Compute Engine, you won't need to worry about supplying connection configuration options to <code>gcloud</code>— we figure that out for you.
45
+
</p>
46
+
<p>
47
+
However, if you're running your app elsewhere, you will need to provide this information.
48
+
</p>
49
+
<divhljs>
50
+
// App Engine and Compute Engine
51
+
var gcloud = require('gcloud');
42
52
43
-
// Elsewhere
44
-
var gcloud = require('gcloud')({
45
-
keyFilename: '/path/to/keyfile.json'
46
-
});</div>
47
-
<p>
48
-
In any environment, you are free to provide these and other default properties, which eventually will be passed to the <code>gcloud</code> sub-modules (Datastore, Storage, etc.).
49
-
</p>
50
-
</article>
51
-
<hr>
52
-
<articleng-if="isActiveDoc('datastore')">
53
-
<h2>Overview</h2>
54
-
<p>
55
-
The <code>gcloud.datastore</code> object gives you some convenience methods, as well as exposes a <code>dataset</code> function. This will allow you to create a <code>dataset</code>, which is the object from which you will interact with the Google Cloud Datastore.
See <ahref="#/docs/datastore/dataset">the Dataset documentation</a> for examples of how to query the datastore, save entities, run a transaction, and others.
65
-
</p>
66
-
</article>
67
-
<articleng-if="isActiveDoc('storage')">
68
-
<h2>Overview</h2>
69
-
<p>
70
-
The <code>gcloud.storage</code> object contains a <code>bucket</code> object, which is how you will interact with your Google Cloud Storage bucket. See the guide on <ahref="https://developers.google.com/storage">Google Cloud Storage</a> to create a bucket.
71
-
</p>
72
-
<p>
73
-
See examples below for more on how to access your bucket to upload a file, read its files, create signed URLs, and more.
74
-
</p>
75
-
</article>
53
+
// Elsewhere
54
+
var gcloud = require('gcloud')({
55
+
keyFilename: '/path/to/keyfile.json'
56
+
});</div>
57
+
<p>
58
+
In any environment, you are free to provide these and other default properties, which eventually will be passed to the <code>gcloud</code> sub-modules (Datastore, Storage, etc.).
59
+
</p>
60
+
</article>
61
+
<hr>
62
+
<articleng-if="isActiveDoc('datastore')">
63
+
<h2>Overview</h2>
64
+
<p>
65
+
The <code>gcloud.datastore</code> object gives you some convenience methods, as well as exposes a <code>dataset</code> function. This will allow you to create a <code>dataset</code>, which is the object from which you will interact with the Google Cloud Datastore.
See <ahref="#/docs/{{version}}/datastore/dataset">the Dataset documentation</a> for examples of how to query the datastore, save entities, run a transaction, and others.
See <ahref="#/docs/datastore/dataset">the Dataset documentation</a> for examples of how to query the datastore, save entities, run a transaction, and others.
89
+
</p>
90
+
</article>
91
+
<articleng-if="isActiveDoc('storage')">
92
+
<h2>Overview</h2>
93
+
<p>
94
+
The <code>gcloud.storage</code> object contains a <code>bucket</code> object, which is how you will interact with your Google Cloud Storage bucket. See the guide on <ahref="https://developers.google.com/storage">Google Cloud Storage</a> to create a bucket.
95
+
</p>
96
+
<p>
97
+
See examples below for more on how to access your bucket to upload a file, read its files, create signed URLs, and more.
0 commit comments