Guest User

Untitled

a guest
Mar 13th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. module.exports = {
  2. /*
  3. Where the content is stored
  4. You can access this property from `bp.dataLocation`
  5. */
  6. dataDir: process.env.BOTPRESS_DATA_DIR || './data',
  7.  
  8. /*
  9. The port on which the API and UI will be available
  10. */
  11. port: process.env.BOTPRESS_PORT || process.env.PORT || 3000,
  12.  
  13. /*
  14. Some modules might generate static configuration files
  15. */
  16. modulesConfigDir: process.env.BOTPRESS_CONFIG_DIR || './modules_config',
  17.  
  18. /*
  19. Path to Content Types
  20. */
  21. contentDir: './content',
  22.  
  23. /*
  24. Path to Flows
  25. */
  26. flowsDir: './flows',
  27.  
  28. /*
  29. Path to Content Types Data
  30. */
  31. contentDataDir: './content_data',
  32.  
  33. /*
  34. By default logs are enabled and available in `dataDir`
  35. */
  36. disableFileLogs: false,
  37. log: {
  38. file: 'bot.log',
  39. maxSize: 1e6 // 1mb
  40. },
  41.  
  42. /*
  43. The web server API config
  44. */
  45. api: {
  46. bodyMaxSize: '1mb'
  47. },
  48.  
  49. /*
  50. Dialog Manager (DM)
  51. */
  52. dialogs: {
  53. timeoutInterval: '15m',
  54. janitorInterval: '10s'
  55. },
  56.  
  57. /*
  58. Botpress collects some anonymous usage statistics to help us put our efforts at the right place
  59. */
  60. optOutStats: false,
  61.  
  62. /*
  63. Where the notifications are stored.
  64. TODO: These should be stored in the database
  65. */
  66. notification: {
  67. file: 'notifications.json',
  68. maxLength: 50
  69. },
  70.  
  71. /*
  72. By default ghost content management is only activated in production
  73. */
  74. ghostContent: {
  75. enabled: process.env.NODE_ENV === 'production' || process.env.BOTPRESS_GHOST_ENABLED
  76. },
  77.  
  78. /*
  79. Access control of admin panel
  80. */
  81. login: {
  82. enabled: process.env.NODE_ENV === 'production',
  83. tokenExpiry: '6 hours',
  84. password: process.env.BOTPRESS_PASSWORD || 'password',
  85. maxAttempts: 3,
  86. resetAfter: 10 * 60 * 1000 // 10 minutes
  87. },
  88.  
  89. /*
  90. Postgres configuration
  91. If Postgres is not enabled, Botpress uses SQLite 3 (file-based database)
  92. */
  93. postgres: {
  94. enabled: process.env.DATABASE === 'postgres',
  95. connection: process.env.DATABASE_URL,
  96. host: process.env.PG_HOST || '127.0.0.1',
  97. port: process.env.PG_PORT || 5432,
  98. user: process.env.PG_USER || '',
  99. password: process.env.PG_PASSWORD || '',
  100. database: process.env.PG_DB || '',
  101. ssl: process.env.PG_SSL || false
  102. },
  103.  
  104. middleware: {
  105. /*
  106. By default Botpress will automatically load all the middlewares before starting your bot
  107. If this is set to false, you should call `bp.middlewares.load` manually
  108. */
  109. autoLoading: true
  110. },
  111.  
  112. // **** Update this if you bought a Botpress license ****
  113. license: {
  114. // customerId: process.env.BOTPRESS_CUSTOMER_ID || 'your_customer_id_here',
  115. // licenseKey: process.env.BOTPRESS_LICENSE_KEY || 'your_key_here'
  116. }
  117. }
Add Comment
Please, Sign In to add comment