Update main.js
This commit is contained in:
parent
8ca9272606
commit
2a0607b3c1
10
main.js
10
main.js
@ -195,6 +195,16 @@ function initWebServer(settings) {
|
|||||||
|
|
||||||
adapter.log.info('config port: ' + settings.port);
|
adapter.log.info('config port: ' + settings.port);
|
||||||
|
|
||||||
|
adapter.getPort(settings.port, function (port) {
|
||||||
|
if (port != settings.port && !adapter.config.findNextPort) {
|
||||||
|
adapter.log.error('port ' + settings.port + ' already in use');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
webServer.listen(port, settings.bind, function() {
|
||||||
|
adapter.log.info('Server listening on http' + (settings.secure ? 's' : '') + '://' + settings.bind + ':' + port);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (settings.port) {
|
if (settings.port) {
|
||||||
if (settings.secure) {
|
if (settings.secure) {
|
||||||
|
Loading…
Reference in New Issue
Block a user