One of the key aspects of a Thorin application is the way it loads the configuration data from various sources, based on the environment it is launched in. A configuration source is a place from which we can read and parse data, that our application will later use as configuration. Out of the box, Thorin offers two configuration sources: disk and sconfig. When you start your application, Thorin will automatically look for configuration under config/{entryFile}.js and config/env/{environment}.js
You can add additional configuration sources by calling the thorin.addConfig(name, opt, _fn)
function.
In order to get started with sconfig.io, please follow the steps on the official repo.
'use strict';
const thorin = require('thorin');
thorin
.addConfig('disk', {
path: 'config/custom.js' // loaded from app/config/custom.js
})
.addConfig('sconfig', {
key: '{32-char API key}',
secret: '{32-char API Secret}',
version: 'latest'
})
.run();
You can always create a new issue on GitHub or contact one of the core founders by chat.