control-freak-ide/server/nodejs/back/lib/hook.io-vfs/examples/google-writeFile.js
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

15 lines
482 B
JavaScript

var vfs = require("../");
var client = vfs.createClient({
adapter: "google",
credentials: {
"private_key": "-----BEGIN PRIVATE KEY-----\nfoofoofoo-----END PRIVATE KEY-----\n",
"client_email": "hellothere@something.iam.gserviceaccount.com"
},
//keyFilename: __dirname + '/../config/g.json', // path to a JSON key file
projectId: 'project_id' // project id
});
client.writeFile('hello.txt', 'hello testing sdk', function (err, file) {
console.log(err, file);
});