Environment Config
The configuration parameters of the project backend are as follows:
- 1module.exports = appInfo => {
- 2 const config = {};
- 3
- 4 // keys
- 5 config.keys = appInfo.name + '_2322e7b4991fx980822de0b37e7624aa_3223';
- 6
- 7 // i18n
- 8 config.i18n = {
- 9 // defaultLocale: 'zh-cn',
- 10 };
- 11
- 12 // subdomainOffset
- 13 config.subdomainOffset = 2;
- 14
- 15 // instances
- 16 config.instances = [
- 17 { subdomain: '', password: '', config: {} },
- 18 { subdomain: 'admin', password: 'yang_789', title: 'CabloyJS', config: {} },
- 19 { subdomain: 'admin2', password: 'yang_789', title: '风南集', config: {} },
- 20 ];
- 21
- 22 // disabledModules
- 23 config.disabledModules = [
- 24 'test-flow', //
- 25 'test-note',
- 26 ];
- 27
- 28 // disabledSuites
- 29 config.disabledSuites = [
- 30 'test-party', //
- 31 ];
- 32
- 33 // mysql
- 34 config.mysql = { ... };
- 35
- 36 // redis
- 37 config.redis = { ... };
- 38
- 39 // module config
- 40 config.modules = { ... };
- 41
- 42 // ok
- 43 return config;
- 44};
keys
The key used to encrypt the backend cookie. The new project will automatically be assigned a key of sufficient length. Regular replacement is still recommended
See also: Cookie & Session
i18n
defaultLocale
: the default language configuration
subdomainOffset
The subdomain name offset is used to intercept the subdomain
from the current full domain name of the website
- For Example
domain | subdomainOffset | subdomain |
---|---|---|
zhennann.cabloy.com | 2(default) | zhennann |
zhennann.cabloy.com | 1 | cabloy.zhennann |
See also: Multi-instance/Multi-domain/Multi-tenant
instances
This parameter is used to configure multiple instances supported by the system, so that multi-tenant SAAS
applications can be implemented
See also: Multi-instance/Multi-domain/Multi-tenant
disabledModules
Array of disabled modules. For example, we can download two test modules: test-note
and test-flow
. These test modules contain a large number of samples and usage paradigms, which are convenient for us to reference and improve development efficiency. If these modules are not needed in the production environment
, just disable these test modules in the configuration file of the production environment
disabledSuites
Array of disabled suites. For example, we can download this suite: test-party
. These test suites contain a large number of samples and usage paradigms, which are convenient for us to reference and improve development efficiency. If these suites are not needed in the production environment
, just disable these test suites in the configuration file of the production environment
mysql
MySQL connection configuration. Generally speaking, the configuration of development environment and production environment is different
See also: MySQL Config
redis
Redis connection configuration
See also: Redis Config
modules
Overwrite the backend configuration of modules here
See also: Override Module Config
Comments: