googlecloudplatform / nodejs-docs-samples Goto Github PK
View Code? Open in Web Editor NEWNode.js samples for Google Cloud Platform products.
Home Page: https://cloud.google.com/nodejs
License: Apache License 2.0
Node.js samples for Google Cloud Platform products.
Home Page: https://cloud.google.com/nodejs
License: Apache License 2.0
Sometimes during the Travis build the kraken test fails for no reason
When running npm test
, at least one test appears to hold on to port 8080 causing later tests to fail.
Rather than using port 8080 for all tests a port picker should be used for each test so that they don't interfere with each other.
I've made several attempts to deploy on app engine and i can't get passed this error.
Beginning teardown of remote build environment (this may take a few seconds). Updating module [default]...|Deleted [https://www.googleapis.com/compute/v1/projects/##################]. Updating module [default]...failed. ERROR: (gcloud.preview.app.deploy) Error Response: [13] Timed out when starting VMs. It's possible that the application code is unhealthy. (0/2 ready, 2 still deploying). My-MacBook-Pro-2:appName-server myMacName$
Typing the above URL into the browser I get this
[{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "header", "location": "Authorization" } ], "code": 401, "message": "Login Required" } }]
We recently added support for engines in package.json:
http://www.marcusoft.net/2015/03/packagejson-and-engines-and-enginestrict.html
Should we pin down the supported nodejs version in each sample?
RE: #47 (comment)
gcloud-node has made some improvements around Key objects, making it easier to reference a name/id, kind, parent, etc. We should use them here to avoid the less-readable key.path.pop()
and key.path[n]
technique.
We could just use postinstall to fire off bower install, or we could include this in the gulp sample
Using the latest sample, line 36 fails:
var datastore = gcloud.datastore.dataset(options);
Error: gcloud.datastore.dataset is not a function
It would be nice to have a quick sample/doc on how to use brunch
https://github.com/brunch/brunch
Logging only has example for App Engine, should also add a sample for compute engine. Also since there are multiple steps involved before Logs can be streamed from Compute Engine, a link to documentation should be added in the docs.
Parse-server sample for Google App Engine for some reason is not recognizing variables (appid and masterkey) in yaml.
When you npm start, you get "You must provide an appId and masterKey!" even if they are in the yaml
Error: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information.
can you help me how can i fix that
This one needs CORS headers.
See sample implementation here:
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/docs/managed_vms/endpoints/app.go
and copy the new swagger file:
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/docs/managed_vms/endpoints/swagger.yaml
See #82 for context.
subject says it all
If I have
obj = {
valueType: 'INT64',
points: {
interval: {
startTime: now,
endTime: now
},
value: {
}
}
}
then i set
obj.valueType = 'STRING';
and obj.points.value.int64Value = 'some JSON'
I get
message: 'Invalid value at \'time_series[0].points.value.int64_value\' (TYPE_INT64),
I want to be able to send JSON to stack driver when an exception occurs in the program. Currently i'm only able to send integers.
@JustinBeckwith says it's not needed anymore.
Right now we're pinned to 0.12.7
Need to fix "cursor_paging" sample
Principle of only using data you need.
Hi,
I'm trying to run the HelloWorld example to trigger an event for a GCS bucket activity. I get the following error. The APIs for container engine has been enabled for the project.
ERROR: (gcloud.alpha.functions.deploy) OperationError: code=13, message=Error when creating Kubernetes cluster for project
Thanks!
when we try to deploy on appengine it doesn't work as expected. where can we get help on the matter? we've been trying for days to get a support answer, and nothing? who the fuck is in charge at google? anyone?
Hi Google team,
the implementation of Parse Server:
app.listen(process.env.PORT || 8080, '0.0.0.0', function()
will lead to sporadic nginx 502 gateway errors. The official parse-server repo uses a different port.
Thanks.
More TODOs after the bare sample is submitted. #105
From @sankalpk on June 13, 2016 2:48
In appengine/express-memcached-session/app.yaml the MEMCACHE_URL is listed as localhost:11211, when it should actually be memcache:11211
Copied from original issue: googleapis/google-cloud-node#1377
I'm using PFUser-Digits resource to authenticate parse users using Twitter's Digits API.
My parse server is hosted on App Engine with MongoLab database.
I get this error when trying to signup/login
Link to Swift File
Link to Cloud Code handling Authentication
2016-03-01 23:59:49.646 Bars[10323:15114219] [Error]: {
code = 107;
message = "Received an error with invalid JSON from Parse: Cannot POST /classes/_User\n";
} (Code: 141, Version: 1.12.0)
2016-03-01 23:59:49.647 Bars[10323:15113659] -[__NSCFDictionary length]: unrecognized selector sent to instance 0x7fe0adc33a10```
Hi,
I have forked the appengine/cloudsql
project and deployed to google cloud however I am getting follow error Connection lost: The server closed the connection. each time I deploy the app. I am able to run application on my local machine using cloud_sql_proxy
without any problem so it seems the issue is somewhere between app engine
and cloud sql
as Mysql connection is always dropping..
In app.yaml
I am using follow MYSQL_SOCKET_PATH: /cloudsql/[YOUR_PROJECT_ID]:[YOUR_REGION]:[YOUR_INSTANCE_NAME]
Are there any changes in configuration or doc that I am missing?
P.S.: I am using second generation of Cloud SQL.
Thanks,
Martin
running the create_custom_metric
on line https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/monitoring/create_custom_metric.js#L218
the object google.auth looks like
{ Compute: [Function], JWT: [Function], OAuth2: [Function] }
no getApplicationDefault
function
I'm supplying a project id, is there something i'm doing wrong here?
Thanks.
What Node.js version runs the Google Cloud Functions in your examples?
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/master/datastore/tasks.js#L116 needs true instead of false.
I cannot figure out how to set the GOOGLE_APPLICATION_CREDENTIALS
on Windows 10.
The documentation is pretty sparse.
I have Node setup OK, and cloned this repo.
I get the following error when running the command node recognize "resources/quit.raw"
Got audio file!
Loading speech service...
{ [Error: Google Cloud Speech API has not been used in project google.com:cloudsdktool before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/speech.googleapis.com/overview?project=google.com:cloudsdktool then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.]
code: 403,
errors:
[ { message: 'Google Cloud Speech API has not been used in project google.com:cloudsdktool before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/speech.googleapis.com/overview?project=google.com:cloudsdktool then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.',
domain: 'global',
reason: 'forbidden' } ] }
Why is it looking at the wrong project?
How do I set it to look at my project (I have a google project with speech api enabled)
I copied this code and it took me some uploads to realize why memcache had problems
the env vars are called memcache and not memcached
If a project already had v1beta2 enabled, the sample works.
But it fails with a new project even if v1beta3 is enabled. The error is "Service Unavailable - Backend Error". Enabling v1beta2 on the new project will cause the sample to work.
I followed all the steps to get the dashboard up and running, it works.
However, its created a problem for me. gloud preview app deploy
gives me errors. It fails to deploy.
I installed the dashboard files within the same folder where I have my parse server.
Parse Server Directory: dev/appName-server/"server files, cloud code, app.yaml e.t.c
Dashboard Directory: dev/appname-server/parse-dashboard
When I run my command to deploy my server code gcloud preview app deploy
I get this problem
Beginning deployment...
ERROR: (gcloud.preview.app.deploy) There is a Dockerfile in the current directory, and the runtime field in /Users/myUserName/Documents/dev/appName-server/app.yaml is currently set to [runtime: nodejs]. To use your Dockerfile to build a custom runtime, set the runtime field in /Users/myUserName/Documents/dev/appName-server/app.yaml to [runtime: custom]. To continue using the [nodejs] runtime, please omit the Dockerfile from this directory.
Even After removing the DockerFile in my dev/appName-server/
directory, my deployment gets stuck at
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
Building and pushing image for module [default]
--- DOCKER BUILD OUTPUT ---
Update: I deleted the parse dashboard from my server folder and reinstalled outside of it and the error still persists stopping me from deploying. gloud preview app deploy
works when I delete the parse dashboard
Beginning deployment...
If this is your first deployment, this may take a while...done.
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
ERROR: gcloud crashed (TLSParameterError): Path to a certificate and key files must be provided through the client_config param. TLS configurations should map the Docker CLI client configurations. See http://docs.docker.com/examples/https/ for API details.
Hi
Why isn't there streaming support?
I am looking at https://github.com/gillesdemey/node-record-lpcm16
Thanks
Please enable master branch protection!
@jmdobry @JustinBeckwith
I added the liveQuery code in my server.js and now I can't deploy
push: {
ios: {
pfx: __dirname + '/cloud/ParsePushDevelopmentCertificate.p12',
bundleId: 'com.bundleIdName.appName',
production: false
}
}
liveQuery: {
classNames: ['Message'];
}
});
// Mount the Parse API server middleware to /parse
app.use(process.env.PARSE_MOUNT_PATH || '/parse', parseServer);
app.get('/', function(req, res) {
res.status(200).send('Be Real');
});
var server = app.listen(process.env.PORT || 8080, '0.0.0.0', function() {
console.log('App listening at http://%s:%s', server.address().address,
server.address().port);
console.log('Press Ctrl+C to quit.');
});
// Initialize a LiveQuery server instance, app is the express app of your Parse Server
let httpServer = require('http').createServer(app);
httpServer.listen(port);
var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer);
ERROR
WARN
engine
[email protected]: wanted: {"node":">=4.3"} (current: {"node":"4.2.3","npm":"2.14.7"})```
Don't know why I get this even though I put this in my package.json
`"node": "~4.3"`
**ERROR LOG: NPM DEBUG**
```0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart [email protected]
6 info start [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec start script
9 verbose stack Error: [email protected] start: `node server.js`
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:821:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd /Users/otymartin/Documents/dev/app-server
12 error Darwin 15.3.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
14 error node v4.3.1
15 error npm v2.14.12
16 error code ELIFECYCLE
17 error [email protected] start: `node server.js`
17 error Exit status 1
18 error Failed at the [email protected] start script 'node server.js'.
18 error This is most likely a problem with the appengine-parse-server package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error node server.js
18 error You can get their info via:
18 error npm owner ls appengine-parse-server
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.