Skip to content

The Config File

Joe Schmitt edited this page Jun 28, 2017 · 3 revisions

Libby is configured by a JSON file that lives at config/default.json.

The config is loaded by the config module, which gives it a few cool powers. First, if you load Libby into your own project, you can have a single config JSON file for both your project and Libby. This is why Libby's settings live inside the alexa-libby key of the config file, and not at the root. Second, you can create a local.json file next to default.json, and any values inside of local will override the ones inside of default. This is useful since default.jsonis version-controlled, and local.json is ignored by git, meaning you'll never accidentally commit your server settings if you use the local.json file. Just note that the config files do a merge, so any keys you leave in default and don't override by local will appear in the final config.

Additionally, the server config fields have some extra super powers in the form of inheritance. This means that any properties set on the root-level server will trickle down to the server fields of every provider. So if your PVR's share a common hostname but different ports, you can just set the hostname once at the root server field, and only set the port on each provider.