From c0579096439956b89a01147d44b448eab913b3ec Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 9 Sep 2022 15:16:03 +0200 Subject: [PATCH] Created the bucket controller to control the google storage bucket --- controller/bucket.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 controller/bucket.ts diff --git a/controller/bucket.ts b/controller/bucket.ts new file mode 100644 index 0000000..3e2c1f4 --- /dev/null +++ b/controller/bucket.ts @@ -0,0 +1,5 @@ +import {Storage} from "@google-cloud/storage"; + +export const storage = new Storage({keyFilename: process.cwd() + "/gbucket.json"}); + +export const bucket = storage.bucket(process.env.GCLOUD_STORAGE_BUCKET || 'sheepstar-cdn'); \ No newline at end of file