Created the bucket controller to control the google storage bucket

This commit is contained in:
Mathias Wagner 2022-09-09 15:16:03 +02:00
parent 2fb459ff1c
commit c057909643
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

5
controller/bucket.ts Normal file
View File

@ -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');