docs
This commit is contained in:
+23
-23
@@ -1,18 +1,18 @@
|
||||
import path from 'path'
|
||||
const pe = process.env;
|
||||
/**
|
||||
* Configuration class
|
||||
* Configuration class, конфигурационен клас
|
||||
*/
|
||||
class Config{
|
||||
name = 'config';
|
||||
|
||||
/**
|
||||
* @class File system options , repository setup
|
||||
* @class File system options, repository setup, настройки на файловата система и хранилището за обекти
|
||||
* @alias FileSystemOptions
|
||||
* @memberof Config
|
||||
*/
|
||||
fs = {
|
||||
/** Repository path
|
||||
/** Repository path, път към хранилището във файловата система
|
||||
* @type {string}
|
||||
* @memberof FileSystemOptions
|
||||
*/
|
||||
@@ -20,18 +20,18 @@ class Config{
|
||||
}
|
||||
|
||||
/**
|
||||
* @class Database options
|
||||
* @class Database options, опции за базата от данни
|
||||
* @alias DatabaseOptions
|
||||
* @memberof Config
|
||||
*/
|
||||
db = {
|
||||
/** Database name
|
||||
/** Database name, име на базата от данни
|
||||
* @type {string}
|
||||
* @memberof DatabaseOptions
|
||||
*/
|
||||
name:'pronature',
|
||||
|
||||
/** Database connection string
|
||||
/** Database connection string, данни за свързване с базата от данни
|
||||
* @type {string}
|
||||
* @memberof DatabaseOptions
|
||||
*/
|
||||
@@ -39,51 +39,51 @@ class Config{
|
||||
}
|
||||
|
||||
/**
|
||||
* @class Web site endpoint options
|
||||
* @class Web site endpoint options, опции за уеб сайта
|
||||
* @alias SiteOptions
|
||||
* @memberof Config
|
||||
*/
|
||||
site = {
|
||||
/** Host name
|
||||
/** Host name, име на хоста
|
||||
* @type {string}
|
||||
* @memberof SiteOptions
|
||||
*/
|
||||
host:'https://localhost:5173',
|
||||
|
||||
/** Whether to use SSL
|
||||
/** Whether to use SSL, дали да използва сигурна връзка
|
||||
* @type {boolean}
|
||||
* @memberof SiteOptions
|
||||
*/
|
||||
ssl: !!parseInt(pe.SRV_SSL),
|
||||
|
||||
/** Port to use
|
||||
/** Port to use, порт за достъп
|
||||
* @type {Number}
|
||||
* @memberof SiteOptions
|
||||
*/
|
||||
port: pe.SRV_PORT,
|
||||
|
||||
/**
|
||||
* @class Certificate data
|
||||
* @class Certificate data, данни за сертификат
|
||||
* @alias CertificateOptions
|
||||
* @memberof SiteOptions
|
||||
*/
|
||||
certificate: {
|
||||
/**
|
||||
* Certificate private key
|
||||
* Certificate private key, частен ключ на сертификата
|
||||
* @type {string}
|
||||
* @memberof CertificateOptions
|
||||
*/
|
||||
key: './.cert/dev-key.pem',
|
||||
|
||||
/**
|
||||
* Certificate public key
|
||||
* Certificate public key, публичен ключ на сертификата
|
||||
* @type {string}
|
||||
* @memberof CertificateOptions
|
||||
*/
|
||||
cert: './.cert/dev-cert.pem',
|
||||
|
||||
/**
|
||||
* PK Passphrase
|
||||
* PK Passphrase, парола за частния ключ
|
||||
* @type {string}
|
||||
* @memberof CertificateOptions
|
||||
*/
|
||||
@@ -92,33 +92,33 @@ class Config{
|
||||
}
|
||||
|
||||
/**
|
||||
* @class Access management options
|
||||
* @class Access management options, настройки за управление на достъпа
|
||||
* @alias AccessManagementOptions
|
||||
* @memberof Config
|
||||
*/
|
||||
am = {
|
||||
/**
|
||||
* Salt, a string to be used in order to make a more complex password hash
|
||||
* Salt, a string to be used in order to make a more complex password hash, допълнителна защита при хеширане на паролите
|
||||
* @type {string}
|
||||
* @memberof AccessManagementOptions
|
||||
*/
|
||||
salt : 'P@ssSal7y!!',
|
||||
|
||||
/**
|
||||
* @class Cookie options
|
||||
* @class Cookie options, опции за бисквитките
|
||||
* @alias CookieOptions
|
||||
* @memberof AccessManagementOptions
|
||||
*/
|
||||
cookie: {
|
||||
/**
|
||||
* Cookie secret
|
||||
* Cookie secret, защита
|
||||
* @type {string}
|
||||
* @memberof CookieOptions
|
||||
*/
|
||||
secret: 'S3cret4C00k!ie$',
|
||||
|
||||
/**
|
||||
* Cookie max age (in seconds)
|
||||
* Cookie max age (in seconds), максимална възраст на бисквитка
|
||||
* @type {Number}
|
||||
* @memberof CookieOptions
|
||||
*/
|
||||
@@ -127,8 +127,8 @@ class Config{
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the configuration
|
||||
* @param {App} app The application
|
||||
* Initializes the configuration, инициализация
|
||||
* @param {App} app The application, апликация
|
||||
*/
|
||||
async init(app){
|
||||
if (!this.fs.repo){
|
||||
@@ -137,8 +137,8 @@ class Config{
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the configuration plugin
|
||||
* @param {App} app the application instance
|
||||
* Starts the configuration plugin, стартиране
|
||||
* @param {App} app the application instance, апликация
|
||||
*/
|
||||
async start(app){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user