From df2ebbf384ad8b78f9c67aae9bc6c80d5d3d36d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Fri, 25 Nov 2016 20:14:34 -0300
Subject: [PATCH 1/4] Add option to set bind address
---
README.md | 1 +
js/server.js | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 11672ef8..e087b4cc 100644
--- a/README.md
+++ b/README.md
@@ -76,6 +76,7 @@ The following properties can be configured:
| **Option** | **Description** |
| --- | --- |
| `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. |
+| `address` | The ip address the accept connections. The default open bind `::` is IPv6 is available or `0.0.0.0` IPv4 run on. Example config: `192.168.10.100`. |
| `ipWhitelist` | The list of IPs from which you are allowed to access the MagicMirror². The default value is `["127.0.0.1", "::ffff:127.0.0.1", "::1"]`. It is possible to specify IPs with subnet masks (`["127.0.0.1", "127.0.0.1/24"]`) or define ip ranges (`["127.0.0.1", ["192.168.0.1", "192.168.0.100"]]`).|
| `kioskmode` | This allows MagicMirror² to run in Kiosk Mode. It protects from other programs popping on top of your screen. The default value is `false`|
| `language` | The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc., but the default value is `en`. |
diff --git a/js/server.js b/js/server.js
index 1f2006d9..0ffd76c6 100644
--- a/js/server.js
+++ b/js/server.js
@@ -17,7 +17,7 @@ var helmet = require("helmet");
var Server = function(config, callback) {
console.log("Starting server op port " + config.port + " ... ");
- server.listen(config.port);
+ server.listen(config.port, config.address ? config.address : null);
app.use(function(req, res, next) {
var result = ipfilter(config.ipWhitelist, {mode: "allow", log: false})(req, res, function(err) {
From facc1dc94468b917a9a9cfb7ce37aba3c0555f88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Fri, 25 Nov 2016 20:20:20 -0300
Subject: [PATCH 2/4] add label where is bind serveronly
---
serveronly/index.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/serveronly/index.js b/serveronly/index.js
index ea435a8e..e033bdc1 100644
--- a/serveronly/index.js
+++ b/serveronly/index.js
@@ -1,5 +1,6 @@
var app = require("../js/app.js");
app.start(function(config) {
console.log("");
- console.log("Ready to go! Please point your browser to: http://localhost:" + config.port);
+ var bind_address = config.address ? config.address : "localhost";
+ console.log("Ready to go! Please point your browser to: http://" + bind_address + ":" + config.port);
});
From a05d7059fb0aade2f3f1a1bdb0e898c04c9523b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Fri, 25 Nov 2016 21:54:03 -0300
Subject: [PATCH 3/4] Update CHANGELOG
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb4cc37b..6777c9ab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Ability to set date format in calendar module
- Possibility to use currentweather for the compliments
- Added option `disabled` for modules.
+- Added option `address` to set bind address.
+- Added option `onlyTemp` for currentweather module to show show only current temperature and weather icon.
### Updated
- Modified translations for Frysk.
From c966d34b07c82875870193634aa2186ad8dfbecd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?=
Date: Fri, 25 Nov 2016 21:55:51 -0300
Subject: [PATCH 4/4] fix camelCase detected eslint
---
serveronly/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/serveronly/index.js b/serveronly/index.js
index e033bdc1..ccd4c294 100644
--- a/serveronly/index.js
+++ b/serveronly/index.js
@@ -1,6 +1,6 @@
var app = require("../js/app.js");
app.start(function(config) {
console.log("");
- var bind_address = config.address ? config.address : "localhost";
- console.log("Ready to go! Please point your browser to: http://" + bind_address + ":" + config.port);
+ var bindAddress = config.address ? config.address : "localhost";
+ console.log("Ready to go! Please point your browser to: http://" + bindAddress + ":" + config.port);
});