From d5bab6e1872e3d718fc4257e8951ef5ee705e958 Mon Sep 17 00:00:00 2001 From: GeethOnion <41124555+GeethOnion@users.noreply.github.com> Date: Wed, 31 Oct 2018 11:28:17 +0530 Subject: [PATCH 1/2] Remove comments Removes all comments from index.js --- examples/cloud-data-storage-client-poc/index.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/cloud-data-storage-client-poc/index.js b/examples/cloud-data-storage-client-poc/index.js index d12223a..1ce28c7 100644 --- a/examples/cloud-data-storage-client-poc/index.js +++ b/examples/cloud-data-storage-client-poc/index.js @@ -1,6 +1,4 @@ -/** - * Before running this file make sure GOOGLE_APPLICATION_CREDENTIALS variable is set - */ + const Storage = require('@google-cloud/storage'); const gcs = new Storage(); @@ -11,7 +9,7 @@ gcs.interceptors.push({ 'https://www.googleapis.com', 'http://localhost:8080' ); - // console.log(JSON.stringify(reqOpts)); + return reqOpts; }, }); @@ -24,10 +22,6 @@ gcs const bucket = await gcs.bucket('test-bucket').get(); - // this endpoint doesn't work correctly - // const uploadRes = await gcs.bucket('test-bucket').upload('./test.txt'); - - // await gcs.bucket('test-bucket').delete(); } catch (err) { console.log(`${err.message}`); } From bcc2d1f7d08ff135afe4c98bd75a978eb4f4cfe5 Mon Sep 17 00:00:00 2001 From: GeethOnion <41124555+GeethOnion@users.noreply.github.com> Date: Wed, 31 Oct 2018 12:26:58 +0530 Subject: [PATCH 2/2] Update index.js According to the mentors instructions. --- examples/cloud-data-storage-client-poc/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/cloud-data-storage-client-poc/index.js b/examples/cloud-data-storage-client-poc/index.js index 1ce28c7..29edb70 100644 --- a/examples/cloud-data-storage-client-poc/index.js +++ b/examples/cloud-data-storage-client-poc/index.js @@ -1,4 +1,6 @@ - +/** + * Before running this file make sure GOOGLE_APPLICATION_CREDENTIALS variable is set + */ const Storage = require('@google-cloud/storage'); const gcs = new Storage();