MagicMirror/js/defaults.js

93 lines
2.4 KiB
JavaScript
Raw Normal View History

2020-05-03 18:59:26 +02:00
/* global mmPort */
2016-03-24 17:19:32 +01:00
/* MagicMirror²
2020-04-21 07:36:18 +02:00
* Config Defaults
2016-03-24 17:19:32 +01:00
*
2020-04-28 23:05:28 +02:00
* By Michael Teeuw https://michaelteeuw.nl
2016-03-24 17:19:32 +01:00
* MIT Licensed.
*/
2021-04-17 16:39:20 +02:00
const address = "localhost";
let port = 8080;
if (typeof mmPort !== "undefined") {
2017-01-31 21:58:46 -03:00
port = mmPort;
}
2021-04-17 16:39:20 +02:00
const defaults = {
address: address,
2017-01-31 21:58:46 -03:00
port: port,
2020-04-06 21:29:55 +02:00
basePath: "/",
2016-07-27 12:50:59 +02:00
kioskmode: false,
electronOptions: {},
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
2016-04-05 14:35:11 -04:00
language: "en",
2021-01-04 10:01:56 +01:00
logLevel: ["INFO", "LOG", "WARN", "ERROR"],
2016-03-29 13:28:15 +02:00
timeFormat: 24,
units: "metric",
zoom: 1,
customCss: "css/custom.css",
// httpHeaders used by helmet, see https://helmetjs.github.io/. You can add other/more object values by overriding this in config.js,
// e.g. you need to add `frameguard: false` for embedding MagicMirror in another website, see https://github.com/MichMich/MagicMirror/issues/2847
httpHeaders: { contentSecurityPolicy: false, crossOriginOpenerPolicy: false, crossOriginEmbedderPolicy: false, crossOriginResourcePolicy: false, originAgentCluster: false },
2016-07-27 12:50:59 +02:00
// properties for checking if server is alive and has same startup-timestamp, the check is per default enabled
// (interval 30 seconds). If startup-timestamp has changed the client reloads the magicmirror webpage.
checkServerInterval: 30 * 1000,
reloadAfterServerRestart: false,
2016-03-24 17:19:32 +01:00
modules: [
2016-10-15 13:08:46 +02:00
{
module: "updatenotification",
position: "top_center"
},
2016-03-24 17:19:32 +01:00
{
2016-04-05 14:35:11 -04:00
module: "helloworld",
position: "upper_third",
2016-04-09 15:49:39 +02:00
classes: "large thin",
2016-03-24 17:19:32 +01:00
config: {
text: "MagicMirror²"
2016-03-24 17:19:32 +01:00
}
},
{
2016-04-05 14:35:11 -04:00
module: "helloworld",
position: "middle_center",
2016-03-24 17:19:32 +01:00
config: {
text: "Please create a config file or check the existing one for errors."
2016-03-24 17:19:32 +01:00
}
},
{
2016-04-05 14:35:11 -04:00
module: "helloworld",
position: "middle_center",
2016-04-09 15:49:39 +02:00
classes: "small dimmed",
2016-03-24 17:19:32 +01:00
config: {
2016-04-09 15:49:39 +02:00
text: "See README for more information."
2016-03-24 17:19:32 +01:00
}
},
{
module: "helloworld",
position: "middle_center",
classes: "xsmall",
config: {
2022-01-26 23:47:51 +01:00
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>"
}
},
2016-03-24 17:19:32 +01:00
{
2016-04-05 14:35:11 -04:00
module: "helloworld",
position: "bottom_bar",
2016-04-09 15:49:39 +02:00
classes: "xsmall dimmed",
2016-03-24 17:19:32 +01:00
config: {
2016-04-09 15:49:39 +02:00
text: "www.michaelteeuw.nl"
2016-03-24 17:19:32 +01:00
}
}
2016-03-24 17:19:32 +01:00
],
paths: {
2016-04-05 14:35:11 -04:00
modules: "modules",
vendor: "vendor"
}
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {
module.exports = defaults;
}