You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configuration.js 1.4KB

12345678910111213141516171819202122232425262728
  1. const path = require("path");
  2. const app_root = path.dirname(__dirname); // Parent of the directory where this file is
  3. module.exports = {
  4. /** Port on which the application will listen */
  5. PORT: parseInt(process.env['PORT']) || 8080,
  6. /** Path to the directory where boards will be saved by default */
  7. HISTORY_DIR: process.env['WBO_HISTORY_DIR'] || path.join(app_root, "server-data"),
  8. /** Folder from which static files will be served */
  9. WEBROOT: process.env['WBO_WEBROOT'] || path.join(app_root, "client-data"),
  10. /** Number of milliseconds of inactivity after which the board should be saved to a file */
  11. SAVE_INTERVAL: parseInt(process.env['WBO_SAVE_INTERVAL']) || 1000 * 2, // Save after 2 seconds of inactivity
  12. /** Periodicity at which the board should be saved when it is being actively used (milliseconds) */
  13. MAX_SAVE_DELAY: parseInt(process.env['WBO_MAX_SAVE_DELAY']) || 1000 * 60, // Save after 60 seconds even if there is still activity
  14. /** Maximal number of items to keep in the board. When there are more items, the oldest ones are deleted */
  15. MAX_ITEM_COUNT: parseInt(process.env['WBO_MAX_ITEM_COUNT']) || 32768,
  16. /** Max number of sub-items in an item. This prevents flooding */
  17. MAX_CHILDREN: parseInt(process.env['WBO_MAX_CHILDREN']) || 128,
  18. /** Maximum value for any x or y on the board */
  19. MAX_BOARD_SIZE: parseInt(process.env['WBO_MAX_BOARD_SIZE']) || 65536,
  20. };