Questions tagged [gcloud-node]

gcloud-node is the 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.

gcloud-node lets you interact with Google Cloud services, such as Datastore and Storage.

Quick Start

$ npm install --save gcloud

Resources

96 questions
3
votes
0 answers

Google Cloud PubSub - implement pull

I am using google pub sub in nodejs. I have a service which publishes messages, and then a worker which listens to the messages and implements some processes on the messages. Now I want my service to pull five subscription at a time and pull…
dina
  • 4,039
  • 6
  • 39
  • 67
3
votes
1 answer

Memory leak in NodeJS + GCloud logging

I have been finding memory leak in our production code for 2 weaks. At the end I reproduced the memory leak with simple nodejs server and gcloud logging api. Nodejs server is the same as inside Nodejs Getting Started Guide 'use strict'; const http…
mmurygin
  • 53
  • 5
3
votes
1 answer

Using Firebase parameters with Google Cloud Storage under node.js

There is no node.js Firebase Storage client at the moment (too bad...), so I'm turning to gcloud-node with the parameters found in Firebase's console. I'm trying : var firebase = require('firebase'); var gcloud = require('gcloud')({ keyFilename:…
3
votes
1 answer

How to get remote client's IP address in an express based Node JS app running on App-Engine

While trying to get IP, all standard headers values contain incorrect value. req.ip: ::ffff:172.17.0.5 req.headers['x-forwarded-for']: 169.254.160.2 req.socket.remoteAddress: ::ffff:172.17.0.5 All of these result in wrong ip.
Vikram Tiwari
  • 3,615
  • 1
  • 29
  • 39
3
votes
2 answers

How to get the URL to a Google Cloud Storage file using gcloud-node?

Using the gcloud Node library, how do I get the URL for a file within a Cloud Storage bucket? Consider the following instantation of a file object: let bucket = gcs.bucket(`aBucket`) let cloudFile = bucket.file(`aFile`) I would like to get the URL…
aknuds1
  • 65,625
  • 67
  • 195
  • 317
3
votes
2 answers

"The caller does not have permission" error when creating new project using node gcloud

I'm using node.js google api (npm gcloud package) to create a new project. this is a beta API. I'm getting an error: "The caller does not have permission" stack: ApiError: The caller does not have permission at new util.ApiError…
Igal
  • 1,084
  • 2
  • 13
  • 33
3
votes
2 answers

Create and Share Bucket in gcloud storage using Node.js Client

I need to create and share a bucket in gcloud storage using Node.js Client. This is my code Bucket.createNewBucket = function (request, callBack) { // code for create a new bucket var bucketName = request.body.bucketName; …
Abdul Manaf
  • 4,933
  • 8
  • 51
  • 95
3
votes
1 answer

Gcloud ApiError: Insufficient Permission even when the same API wrote the file to Storage

I'm at a loss here. My node code successfully uploaded files to gcloud Storage but can't seem to make the file public or even change the acl. Fact is that the file was written in gcloud storage, but can't make the same file Public. The error…
andrew
  • 61
  • 1
  • 5
3
votes
1 answer

Bigquery API Intermittently returns http error 400 "Bad Request"

I am getting http error 400 returns intermittently for a particular query, yet when I examine the text of the query it appears to be correct, and if I then copy the query to the Bigquery GUI and run it, it executes without any problems. The query is…
user1849860
  • 237
  • 3
  • 11
3
votes
3 answers

gcloud pubsub - how to create watch request

I've created a topic, subscribed to it, set publishing rights of the topic using Google's API Explorer and now need to create a watch request, as described here: https://developers.google.com/gmail/api/guides/push However, according to previous…
Sekoul
  • 1,361
  • 2
  • 14
  • 30
3
votes
3 answers

Is there a caching library for google datastore api in node.js

I'm looking into using gcloud node api to access the datastore api but was curious if it supported query caching in a similar manner to ndb? If not, what's the best way to make sure repeated queries are cached?
user257543
  • 881
  • 1
  • 14
  • 35
2
votes
1 answer

How to get the latest 20 or so image versions(tags) of an image pushed to google container registry?

I need a list of the 20-30 latest image versions that have been pushed to the gcr using APIs. I know that we can use https://cloud.google.com/sdk/gcloud/reference/container/images/list. But I want it using apis. I have used client.tags() from the…
amv
  • 81
  • 8
2
votes
3 answers

Can you check whether a table exists via the Cloud Spanner API? (in Node.js)

How can i detect table exist or not in database by table name? there is not like: database.exist('some table name') I write my function: const queryTableExist = (tableName) => { return { sql: `SELECT t.table_name FROM…
2
votes
2 answers

How to reset emulator DB before each test?

I'm running tests with the gcloud datastore emulator for node. I want to reset the db before each test. Is there a quick way like a 'drop' command or something I can use in a beforeEach block ?
Gyro
  • 944
  • 1
  • 8
  • 16
2
votes
0 answers

Google Cloud Datastore very slow after trying to get more than 100 000 entities

I'm trying to get the large amount of entities with runQuery request. I have an entity kind Task, which contains: integer id integer TaskGroupId non-indexed string field (~200B) The request body: { "query": { "kind": [ { "name": "Task" …
mmurygin
  • 53
  • 5