Configuration properties

Configuration Properties

Config

const Logger = require("xtrmaddons-soft-suite-conf");

Config keys documentation

Key Definition Default
app Property application reference name.
environment Property environment
filename Property filename of de configuration.
secret Property secret application key.
const appRefName = Config.app;
const environment = Config.environment;
const filename = Config.filename;
const secret = Config.secret;

Key Type Definition Default
host string Property hostname of the ExpressJs Services Server.
port number Property port of the ExpressJs Services Server.
protocol string Property protocol of the ExpressJs Services Server.
rootDir string Property application root directory.
BCrypt definition.
bcrypt string Lib to help you to hash passwords.
bcrypt:saltRounds number
Bearer token definition.
bearer_token string Property ExpressJs bearer token: Per RFC6750 this module will attempt to extract a bearer token from a request.
bearer_token:bodyKey string bearer token body key
bearer_token:queryKey string bearer token query key
bearer_token:headerKey string bearer token header key
bearer_token:reqKey string bearer token request key
Database definition. string
db object Property SQLite3 database connector informations.
db:dateFormat string Format of dates to store in the database.
db:data string Absolute path to the directory to store database files.
db:file string Name of the database file.
db:migrations string Absolute path to the directory of migrations.
db.path() function Method filename or full path to the dabase file.
Distribution definition.
dist object Property definition of the distribution.
dist:directory string Property absolute path to the directory to store the distribution.
dist.path() function Method filename or full path to the starting point the distribution.
Locales definition.
i18n string Property locales definition.
i18n:locales string
i18n:directory string
// Example: getting main application server host
const host = Config.get("host");