- Enabled the storage api and storage json api
- Created the json private key
- var gcloud = require('gcloud'),
bucket = new gcloud.storage.Bucket({
bucketName: 'BUCKET_NAME',
keyFilename: 'path/to/key.json'
});
And tried different methods:
bucket.list(function(err, files, nextQuery) {
// if more results, nextQuery will be non-null.
console.log("callback returned");
});
//
//bucket.writeBuffer("testLog.txt", { data: 'Hello World' }, function(err){
// console.log("callback returned");
//});
All return with "getaddrinfo ENOTFOUND" message
bucket = new gcloud.storage.Bucket({
bucketName: 'BUCKET_NAME',
keyFilename: 'path/to/key.json'
});
And tried different methods:
bucket.list(function(err, files, nextQuery) {
// if more results, nextQuery will be non-null.
console.log("callback returned");
});
//
//bucket.writeBuffer("testLog.txt", { data: 'Hello World' }, function(err){
// console.log("callback returned");
//});
All return with "getaddrinfo ENOTFOUND" message