New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

setec-app-config

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

setec-app-config

A quick app configurator that loads AWS KMS secrets via Setec.

  • 1.1.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
1
Weekly downloads
 
Created
Source

setec-app-config

A quick app configurator that loads AWS KMS secrets via Setec.

API

class SetecAppConfig

new SetecAppConfig(opts)

Options:

  • config: your configuration object, with any Setec secrets as {secret: 'secret-name'}; required unless configFile is given
  • configFile: a JSON file version of config, or a Javscript file exporting the same; overrides config; required unles config is given
  • s3Bucket: the S3 bucket from which Setec should load secret configuration; required
  • s3Prefix: the prefix for Setec to use when loading secret configuration; defaults to 'setec'
load()

Asynchronously load Setec secrets and return the resolved configuration object via a Promise.

Returns Promise(configWithSecretsLoaded)

exportable()

Returns an object suitable for exporting as a Node.js module for the following convenient usage pattern:

my-config-module.js
const SetecAppConfig = require('setec-app-config');

module.exports = new SetecAppConfig({
    configFile: 'path/to/my-secret-free-config.json',
    s3Bucket: 'my-setec-config-bucket'
}).exportable();
your app's entry point (index.js, i.e. the "main" file)
const myConfig = require('./my-config-module');

// ES7 example
await myConfig.load();
db.connect(myConfig.user, myConfig.secretPassword); // i.e., do something with loaded secrets

// pre-ES7 example
myConfig.load().then(() => {
    db.connect(myConfig.user, myConfig.secretPassword); // i.e., do something with loaded secrets
});

FAQs

Package last updated on 05 Oct 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc