mead-plugin-source-nectar-gcs

    1.1.7 • Public • Published

    mead-plugin-source-nectar-gcs

    Mead source adapter that fetches lower-resolution versions from GCS (generated by nectar)

    Installation

    npm install --save mead-plugin-source-nectar-gcs
    

    Usage

    Your mead configuration file (mead --config <path-to-config.js>):

    module.exports = {
      // Load the plugin
      plugins: [
        require('mead-plugin-source-nectar-gcs')
      ],
     
      sources: [{
        name: 'mynectarsource',
        adapter: {
          type: 'nectar-gcs',
          config: {
            cacheWidths: [50, 200, 600, 1200, 2000],
     
            // Options to pass onto `mead-plugin-source-gcs`
            gcs: {
              projectId: process.env.GOOGLE_CLOUD_PROJECT_ID,
              bucket: process.env.GOOGLE_CLOUD_BUCKET_NAME,
              cacheBucket: 'someOtherBucket',
              keyFilename: process.env.GOOGLE_CLOUD_GCS_KEY_PATH || '/secrets/gcs-credentials.json',
              pathPrefix: '/images',
              cachePrefix: '/images-cache'
            },
     
            // Options to pass onto `@google-cloud/pubsub` (`topic` is used in this plugin, however)
            pubsub: {
              projectId: process.env.GOOGLE_CLOUD_PROJECT_ID,
              keyFilename: process.env.GOOGLE_CLOUD_PUBSUB_KEY_PATH || '/secrets/pubsub-credentials.json',
              topic: process.env.GOOGLE_CLOUD_PUBSUB_TOPIC || 'nectar',
            },
          }
        }
      }]
    }

    License

    MIT-licensed. See LICENSE.

    Install

    npm i mead-plugin-source-nectar-gcs

    DownloadsWeekly Downloads

    3

    Version

    1.1.7

    License

    MIT

    Last publish

    Collaborators

    • rexxars