Propriétés de configuration

Propriétés de configuration

Import class Config

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

Documentation des clés de Config

Clé Définition Défaut
app Propriété nom de reférence de l'application.
environment Propriété environement.
filename Propriété filename of de configuration.
secret Propriété clé secrète de l'application.
const appRefName = Config.app;
const environment = Config.environment;
const filename = Config.filename;
const secret = Config.secret;

Key Type Definition Défaut
host string Propriété hostname of the ExpressJs Services Server.
port number Propriété port of the ExpressJs Services Server.
protocol string Propriété protocol of the ExpressJs Services Server.
rootDir string Propriété application root directory.
BCrypt definition.
bcrypt string Lib to help you to hash passwords.
bcrypt:saltRounds number
Bearer token definition.
bearer_token string Propriété 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 Propriété 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 Propriété definition of the distribution.
dist:directory string Propriété 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 Propriété locales definition.
i18n:locales string
i18n:directory string
// Example: getting main application server host
const host = Config.get("host");