FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

Config Builder

v1.0.1 Public

Config Builder

This is a custom DSL for WireBox that will return whatever configuration information exists at the path specified.

Requirements

  • Lucee 5+
  • ColdBox 4+

Installation

Install using CommandBox: box install config-builder

The module will configure itself and register a DSL when the ColdBox application starts.

Usage

Consider the following chunk of config.Coldbox [sic]:

    variables.settings = {
        search = {
            published = {
                solr_host = "supercluster.ecivis.com:8993",
                solr_core = "pure_gold"
            },
            incoming = {
                solr_host = "aggregator.ecivis.com:8995",
                solr_core = "raw_ore"
            }
        },
        auth = {
            tokens = {
                test = ["foo", "bar"],
                prod = ["secret", "monkey"]
            }
        }
    }

To inject a specific search configuration structure, use this type of injection with any component that is instantiated by WireBox:

    property name="publishedSearch" inject="config:search.published";

To inject a specific nested value:

    property name="prodTokens" inject="config:auth.tokens.prod";

A possible future enhancement would be to support an injection like this:

    property name="prodToken" inject="config:auth.tokens.prod[1]";

License

See the LICENSE file for license rights and limitations (MIT).

Here are all the versions for this package. Please note that you can leverage CommandBox package versioning to install any package you like. Please refer to our managing package version guide for more information.

Version Created Last Update Published By Stable Actions
Current
1.0.1 Jun 16 2018 06:29 PM Jun 16 2018 06:29 PM
Version History
1.0.0 Jun 16 2018 06:17 PM Jun 16 2018 06:17 PM

 

No collaborators yet.
     
  • Jun 16 2018 06:17 PM
  • Jun 16 2018 06:29 PM
  • 356
  • 0
  • 507