Skip to content
Fastify plugin that exposes a GCP Cloud Storage client instance.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package-lock.json
package.json
test.js

README.md

fastify-google-cloud-storage

Install

npm install --save fastify-google-cloud-storage

Usage

Import "fastify-google-cloud-storage" and register it into Fastify instance

fastify.register(require('fastify-google-cloud-storage'), {
  projectId: '',    // [string, required] GCP project id
  keyFilename: ''   // [string, optional] path to service account json file 
})

you can access the Cloud Storage client via:

const cloudStorage = fastify.googleCloudStorage
You can’t perform that action at this time.