您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

configuration.js 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. /** Host on which the application will listen (defaults to undefined,
  7. hence listen on all interfaces on all IP addresses, but could also be
  8. '127.0.0.1' **/
  9. HOST: process.env["HOST"] || undefined,
  10. /** Path to the directory where boards will be saved by default */
  11. HISTORY_DIR:
  12. process.env["WBO_HISTORY_DIR"] || path.join(app_root, "server-data"),
  13. /** Folder from which static files will be served */
  14. WEBROOT: process.env["WBO_WEBROOT"] || path.join(app_root, "client-data"),
  15. /** Number of milliseconds of inactivity after which the board should be saved to a file */
  16. SAVE_INTERVAL: parseInt(process.env["WBO_SAVE_INTERVAL"]) || 1000 * 2, // Save after 2 seconds of inactivity
  17. /** Periodicity at which the board should be saved when it is being actively used (milliseconds) */
  18. MAX_SAVE_DELAY: parseInt(process.env["WBO_MAX_SAVE_DELAY"]) || 1000 * 60, // Save after 60 seconds even if there is still activity
  19. /** Maximal number of items to keep in the board. When there are more items, the oldest ones are deleted */
  20. MAX_ITEM_COUNT: parseInt(process.env["WBO_MAX_ITEM_COUNT"]) || 32768,
  21. /** Max number of sub-items in an item. This prevents flooding */
  22. MAX_CHILDREN: parseInt(process.env["WBO_MAX_CHILDREN"]) || 192,
  23. /** Maximum value for any x or y on the board */
  24. MAX_BOARD_SIZE: parseInt(process.env["WBO_MAX_BOARD_SIZE"]) || 65536,
  25. /** Maximum messages per user over the given time period before banning them */
  26. MAX_EMIT_COUNT: parseInt(process.env["WBO_MAX_EMIT_COUNT"]) || 192,
  27. /** Duration after which the emit count is reset in miliseconds */
  28. MAX_EMIT_COUNT_PERIOD:
  29. parseInt(process.env["WBO_MAX_EMIT_COUNT_PERIOD"]) || 4096,
  30. /** Blocked Tools. A comma-separated list of tools that should not appear on boards. */
  31. BLOCKED_TOOLS: (process.env["WBO_BLOCKED_TOOLS"] || "").split(","),
  32. /** Automatically switch to White-out on finger touch after drawing
  33. with Pencil using a stylus. Only supported on iPad with Apple Pencil. */
  34. AUTO_FINGER_WHITEOUT: process.env['AUTO_FINGER_WHITEOUT'] !== "disabled",
  35. };