mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Fix if MM_PORT enviroment variable is set
This commit is contained in:
parent
4fdd12bc48
commit
c282bb2fe1
@ -59,6 +59,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Module currentWeather: check if temperature received from api is defined.
|
||||
- Fix an issue with module hidden status changing to `true` although lock string prevented showing it
|
||||
- Fix newsfeed module bug (removeStartTags)
|
||||
- Fix when is set MM_PORT enviroment variable.
|
||||
|
||||
## [2.1.0] - 2016-12-31
|
||||
|
||||
|
10
js/server.js
10
js/server.js
@ -15,9 +15,15 @@ var fs = require("fs");
|
||||
var helmet = require("helmet");
|
||||
|
||||
var Server = function(config, callback) {
|
||||
console.log("Starting server op port " + config.port + " ... ");
|
||||
|
||||
server.listen(config.port, config.address ? config.address : null);
|
||||
var port = config.port;
|
||||
if (process.env.MM_PORT) {
|
||||
port = process.env.MM_PORT;
|
||||
}
|
||||
|
||||
console.log("Starting server op port " + port + " ... ");
|
||||
|
||||
server.listen(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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user