Socket
Book a DemoInstallSign in
Socket

confabulous-s3-loader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

confabulous-s3-loader

A confabulous s3 loader

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

Confabulous S3 Loader

Confabulous-S3-Loader is an S3 Loader for Confabulous - a hierarchical, asynchronous config loader and post processor.

TL;DR

const confabulous = require('confabulous')
const Confabulous = confabulous.Confabulous
const s3Loader = require('confabulous-s3-loader')
const processors = confabulous.processors

new Confabulous()
    .add((config) => s3Loader({ bucket: config.bucket, key: config.key, mandatory: false, watch: { interval: '5m' } }))
    .on('loaded', (config) => console.log('Loaded', JSON.stringify(config, null, 2)))
    .on('reloaded', (config) => console.log('Reloaded', JSON.stringify(config, null, 2)))
    .on('error', (err) => console.error('Error', err))
    .on('reload_error', (err) => console.error('Reload Error', err))
    .end()

Options

OptionTypeDefaultNotes
mandatorybooleantrueCauses an error/reload_error to be emitted if the configuration does not exist
watchobjectWatching is implemented by issuing HEAD requests and comparing the Etag and Last-Modified headers. You need to specify and interval in the configuration, e.g. { watch: { interval: '5m' } }

Keywords

Confabulous

FAQs

Package last updated on 09 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts