Magic Cloud

An Open Source Application Generator


Magic Lambda Config

This project provides configuration settings slots for Magic. The project provides one single slot, allowing you to retrieve configuration settings from your configuration file as follows.

You can supply a “path” such as “foo:bar”, which will traverse into your “foo” config setting, find its “bar” key, and return the value of your “bar” key. Below is an example of usage.

config.get:"foo:bar"

Assuming your configuration file looks like the following.

{
   "foo": {
      "bar": 42
   }
}

… afterwards the value of your [config.get] node will be the following.

config.get:42

Notice - As of this writing, I am still trying to figure out how to return values as the correct types, and also how to have the [config.section] return a hierarchy of the entire section. In a future version, I might figure this out, at which point the APIs for these methods will slightly change. They are currently both to be considered as BETA versions.

Project website

The source code for this repository can be found at github.com/polterguy/magic.lambda.config, and you can provide feedback, provide bug reports, etc at the same place.

Quality gates

License

This project is the copyright(c) 2020-2021 of Thomas Hansen thomas@servergardens.com, and is licensed under the terms of the LGPL version 3, as published by the Free Software Foundation. See the enclosed LICENSE file for details.