Environment Config

The configuration parameters of the project backend are as follows:

  1. 1module.exports = appInfo => {
  2. 2 const config = {};
  3. 3
  4. 4 // keys
  5. 5 config.keys = appInfo.name + '_2322e7b4991fx980822de0b37e7624aa_3223';
  6. 6
  7. 7 // i18n
  8. 8 config.i18n = {
  9. 9 // defaultLocale: 'zh-cn',
  10. 10 };
  11. 11
  12. 12 // subdomainOffset
  13. 13 config.subdomainOffset = 2;
  14. 14
  15. 15 // instances
  16. 16 config.instances = [
  17. 17 { subdomain: '', password: '', config: {} },
  18. 18 { subdomain: 'admin', password: 'yang_789', title: 'CabloyJS', config: {} },
  19. 19 { subdomain: 'admin2', password: 'yang_789', title: '风南集', config: {} },
  20. 20 ];
  21. 21
  22. 22 // disabledModules
  23. 23 config.disabledModules = [
  24. 24 'test-flow', //
  25. 25 'test-note',
  26. 26 ];
  27. 27
  28. 28 // disabledSuites
  29. 29 config.disabledSuites = [
  30. 30 'test-party', //
  31. 31 ];
  32. 32
  33. 33 // mysql
  34. 34 config.mysql = { ... };
  35. 35
  36. 36 // redis
  37. 37 config.redis = { ... };
  38. 38
  39. 39 // module config
  40. 40 config.modules = { ... };
  41. 41
  42. 42 // ok
  43. 43 return config;
  44. 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