mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-02 22:08:42 +00:00
Merge pull request #800 from roramirez/test-set-MM_PORT
Test set mm port
This commit is contained in:
commit
65d9e5d1fc
@ -57,6 +57,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Added multiple calendar icon support.
|
- Added multiple calendar icon support.
|
||||||
- Added meta tags to support fullscreen mode on iOS (for server mode)
|
- Added meta tags to support fullscreen mode on iOS (for server mode)
|
||||||
- Added `ignoreOldItems` and `ignoreOlderThan` options to the News Feed module
|
- Added `ignoreOldItems` and `ignoreOlderThan` options to the News Feed module
|
||||||
|
- Added test for MM_PORT enviroment variable.
|
||||||
- Added a configurable Week section to the clock module.
|
- Added a configurable Week section to the clock module.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
@ -68,6 +69,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Module currentWeather: check if temperature received from api is defined.
|
- 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 an issue with module hidden status changing to `true` although lock string prevented showing it.
|
||||||
- Fix newsfeed module bug (removeStartTags)
|
- Fix newsfeed module bug (removeStartTags)
|
||||||
|
- Fix when is set MM_PORT enviroment variable.
|
||||||
- Fixed missing animation on `this.show(speed)` when module is alone in a region.
|
- Fixed missing animation on `this.show(speed)` when module is alone in a region.
|
||||||
|
|
||||||
## [2.1.0] - 2016-12-31
|
## [2.1.0] - 2016-12-31
|
||||||
|
@ -17,7 +17,14 @@ var helmet = require("helmet");
|
|||||||
var Server = function(config, callback) {
|
var Server = function(config, callback) {
|
||||||
console.log("Starting server on port " + config.port + " ... ");
|
console.log("Starting server on 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);
|
||||||
|
|
||||||
if (config.ipWhitelist instanceof Array && config.ipWhitelist.length == 0) {
|
if (config.ipWhitelist instanceof Array && config.ipWhitelist.length == 0) {
|
||||||
console.info("You're using a full whitelist configuration to allow for all IPs")
|
console.info("You're using a full whitelist configuration to allow for all IPs")
|
||||||
|
@ -29,4 +29,23 @@ describe("port directive configuration", function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("Set port 8100 on enviroment variable MM_PORT", function () {
|
||||||
|
before(function() {
|
||||||
|
process.env.MM_PORT = 8100;
|
||||||
|
// Set config sample for use in this test
|
||||||
|
process.env.MM_CONFIG_FILE = "tests/configs/port_8090.js";
|
||||||
|
});
|
||||||
|
|
||||||
|
after(function(){
|
||||||
|
delete process.env.MM_PORT;
|
||||||
|
});
|
||||||
|
it("should return 200", function (done) {
|
||||||
|
request.get("http://localhost:8100", function (err, res, body) {
|
||||||
|
expect(res.statusCode).to.equal(200);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user