Socket
Socket
Sign inDemoInstall

@brightcove-gs/odyssey-config

Package Overview
Dependencies
21
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @brightcove-gs/odyssey-config

Application configuration variables for Odyssey node app


Version published
Maintainers
1
Install size
1.98 MB
Created

Readme

Source

Odyssey Config

A configuration manager utilizing nconf

Install

yarn add @brightcove-gs/odyssey-config

Usage

const Config = require('@brightcove-gs/odyssey-config')

const defaults = {
  WWW_URL: 'https://www.example.com',
  IS_AWESOME: true,
  SCORE: 100,
  COLORS: ['red', 'green', 'blue'],
}

const config = Config(defaults)

config.get('IS_AWESOME') // => true

NOTES

  • Precedence

    1. Environment Variables trump all
    2. .env.json in the root directory takes second
    3. Passed in defaults object
  • Casting

    All values should have a default in the type they expect to be. For example, if you use a variable string WWW_URL = 'https://www.example.com'. You should declare a default value so it knows how to handle incoming environment variables.

FAQs

Last updated on 04 Dec 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc