forked from googleapis/google-cloud-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.html
More file actions
executable file
·161 lines (141 loc) · 6.43 KB
/
home.html
File metadata and controls
executable file
·161 lines (141 loc) · 6.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<header class="page-header" role="banner">
<h1 class="logo"><img src="site/img/logo-full.svg" alt="Google Cloud Platform" /></h1>
</header><!-- end of .page-header -->
<article class="main" role="main">
<section class="hero-banner">
<div class="container clearfix">
<div class="quote-box">
<h1>gcloud</h1>
<p>Google Cloud Client Library for Node.js
- an idiomatic, intuitive, and natural way for Node.js developers to
integrate with Google Cloud Platform services, like Cloud Datastore
and Cloud Storage.</p>
</div>
<div class="quote-box--supplementary">
<h2>One-line npm install</h2>
<pre>$ npm install --save gcloud</pre>
</div>
</div><!-- end of .container -->
</section><!-- end of .hero-banner -->
<section class="block featuring">
<div class="container">
<ul class="featuring-links">
<li>
<a href="#/docs/{{latestVersion}}" title="gcloud-node docs" class="btn btn-docs">
<img src="site/img/icon-lang-nodejs.svg" alt="Node.js icon" />
Read the Docs
</a>
</li>
<li>
<a href="https://github.com/GoogleCloudPlatform/gcloud-node" title="gcloud-node on GitHub" class="ext-link">
<img src="site/img/icon-link-github.svg" alt="GitHub icon" />
GitHub
</a>
</li>
<li>
<a href="https://github.com/GoogleCloudPlatform/gcloud-node/issues" title="gcloud-node issues on Github" class="ext-link">
<img src="site/img/icon-link-github.svg" alt="GitHub icon" />
Issues
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/gcloud-node" title="gcloud-node on StackOverflow" class="ext-link">
<img src="site/img/icon-link-stackoverflow.svg" alt="StackOverflow icon" />
StackOverflow
</a>
</li>
<li>
<a href="http://npmjs.org/package/gcloud" title="gcloud-node on npm" class="ext-link">
<img src="site/img/icon-link-package-manager.svg" alt="npm icon" />
npm
</a>
</li>
</ul>
</div><!-- end of .container -->
</section><!-- end of .featuring -->
<section class="block about">
<div class="container clearfix">
<div class="quote-box">
<h3 class="block-title">What is it?</h3>
<p><code>gcloud</code> is a client library for accessing Google
Cloud Platform services that significantly reduces the boilerplate
code you have to write. The library provides high-level API
abstractions so they're easier to understand. It embraces
idioms of Node.js, works well with the standard library, and
integrates better with your codebase.
All this means you spend more time creating code that matters
to you.</p>
<p><code>gcloud</code> is configured to access Google Cloud Platform
services and authorize (OAuth 2.0) automatically on your behalf.
With a one-line install and a private key, you are up and ready
to go. Better yet, if you are running on a Google Compute Engine
instance, the one-line install is enough!</p>
</div>
<div class="quote-box--supplementary">
<h4>Example: Retrieve an entity from Cloud Datastore</h4>
<div class="code-sample-tabs" ng-init="selected = 'compute engine'">
<a ng-click="selected = 'compute engine'"
ng-class="{selected: selected == 'compute engine'}"
>Run in Compute Engine</a>
<a ng-click="selected = 'elsewhere'"
ng-class="{selected: selected == 'elsewhere'}"
>Run elsewhere</a>
</div>
<div hljs language="js" ng-show="selected == 'compute engine'">
// Auth is handled automatically inside GCE.
var gcloud = require('gcloud');
var dataset = gcloud.datastore.dataset();
var productKey = dataset.key(['Product', 123]);
dataset.get(productKey, function(err, entity) {
console.log(err, entity);
});</div>
<div hljs language="js" ng-show="selected == 'elsewhere'">
var gcloud = require('gcloud')({
projectId: 'my-project',
keyFilename: '/path/to/keyfile.json'
});
var dataset = gcloud.datastore.dataset();
var productKey = dataset.key(['Product', 123]);
dataset.get(productKey, function(err, entity) {
console.log(err, entity);
});</div>
</div>
</div><!-- end of .container -->
</section><!-- end of .featuring -->
<section class="block examples">
<div class="container clearfix">
<h3 class="block-title">Examples</h3>
<ul>
<li>
<a href="http://gcloud-todos.appspot.com">TodoMVC</a> (<em><a href="https://github.com/GoogleCloudPlatform/gcloud-node-todos">source</a>, <a href="https://cloud.google.com/solutions/nodejs">docs</a></em>) - TodoMVC backend using gcloud-node and Express.
</li>
<li>
<a href="https://github.com/stephenplusplus/gcloud-keystore">gcloud-keystore</a> - Use a gcloud-node dataset as a Key/Value store.
</li>
</ul>
</div>
</section>
<section class="block">
<div class="container clearfix">
<h3 class="block-title">FAQ</h3>
<h4>What is the relationship between the <code>gcloud</code> package
and the <code>gcloud</code> command-line tool?</h4>
<p>Both the <code>gcloud</code> command-line tool and
<code>gcloud</code> package are a part of the Google Cloud SDK: a collection
of tools and libraries that enable you to easily create and manage
resources on the Google Cloud Platform. The <code>gcloud</code> command-line
tool can be used to manage both your development workflow and your
Google Cloud Platform resources while the <code>gcloud</code> package is the
Google Cloud Client Library for Node.js.</p>
<h4>What is the relationship between <code>gcloud</code>
and the Google APIs Node.js Client?</h4>
<p>The <a href="https://github.com/google/google-api-nodejs-client">
Google APIs Node.js Client</a> is a client library for
using the broad set of Google APIs.
<code>gcloud</code> is built specifically for the Google Cloud Platform
and is the recommended way to integrate Google Cloud APIs into your
Node.js applications. If your application requires both Google Cloud Platform and
other Google APIs, the 2 libraries may be used by your application.</p>
</div>
</section> <!-- end of FAQ -->
</article><!-- end of .main -->