defaults.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* global mmPort */
  2. const address = "localhost";
  3. let port = 8080;
  4. if (typeof mmPort !== "undefined") {
  5. port = mmPort;
  6. }
  7. const defaults = {
  8. address: address,
  9. port: port,
  10. basePath: "/",
  11. kioskmode: false,
  12. electronOptions: {},
  13. ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
  14. language: "en",
  15. logLevel: ["INFO", "LOG", "WARN", "ERROR"],
  16. timeFormat: 24,
  17. units: "metric",
  18. zoom: 1,
  19. customCss: "css/custom.css",
  20. foreignModulesDir: "modules",
  21. // httpHeaders used by helmet, see https://helmetjs.github.io/. You can add other/more object values by overriding this in config.js,
  22. // e.g. you need to add `frameguard: false` for embedding MagicMirror in another website, see https://github.com/MagicMirrorOrg/MagicMirror/issues/2847
  23. httpHeaders: { contentSecurityPolicy: false, crossOriginOpenerPolicy: false, crossOriginEmbedderPolicy: false, crossOriginResourcePolicy: false, originAgentCluster: false },
  24. // properties for checking if server is alive and has same startup-timestamp, the check is per default enabled
  25. // (interval 30 seconds). If startup-timestamp has changed the client reloads the magicmirror webpage.
  26. checkServerInterval: 30 * 1000,
  27. reloadAfterServerRestart: false,
  28. modules: [
  29. {
  30. module: "updatenotification",
  31. position: "top_center"
  32. },
  33. {
  34. module: "helloworld",
  35. position: "upper_third",
  36. classes: "large thin",
  37. config: {
  38. text: "MagicMirror²"
  39. }
  40. },
  41. {
  42. module: "helloworld",
  43. position: "middle_center",
  44. config: {
  45. text: "Please create a config file or check the existing one for errors."
  46. }
  47. },
  48. {
  49. module: "helloworld",
  50. position: "middle_center",
  51. classes: "small dimmed",
  52. config: {
  53. text: "See README for more information."
  54. }
  55. },
  56. {
  57. module: "helloworld",
  58. position: "middle_center",
  59. classes: "xsmall",
  60. config: {
  61. text: "If you get this message while your config file is already created,<br>" + "it probably contains an error. To validate your config file run in your MagicMirror² directory<br>" + "<pre>npm run config:check</pre>"
  62. }
  63. },
  64. {
  65. module: "helloworld",
  66. position: "bottom_bar",
  67. classes: "xsmall dimmed",
  68. config: {
  69. text: "www.michaelteeuw.nl"
  70. }
  71. }
  72. ]
  73. };
  74. /*************** DO NOT EDIT THE LINE BELOW ***************/
  75. if (typeof module !== "undefined") {
  76. module.exports = defaults;
  77. }