diff options
author | Max Wu | 2016-09-06 20:36:40 +0800 |
---|---|---|
committer | GitHub | 2016-09-06 20:36:40 +0800 |
commit | 1d210d1fa53897c2741a1c6d55151a0df6215efc (patch) | |
tree | 66fbe7539b45c596442664245039b6ee62b0d379 | |
parent | c8f2ec4d3d25a6e872d0beee8b79e25b10ddcf36 (diff) | |
parent | 56a3a1d85da0f01d6ee53e1b7ca3a13de30476ab (diff) |
Merge pull request #168 from zored/master
Removed redundant condition.
Diffstat (limited to '')
-rw-r--r-- | app.js | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -509,17 +509,11 @@ io.sockets.on('connection', realtime.connection); //listen function startListen() { - if (config.usessl) { - server.listen(config.port, function () { - logger.info('HTTPS Server listening at port %d', config.port); - config.maintenance = false; - }); - } else { - server.listen(config.port, function () { - logger.info('HTTP Server listening at port %d', config.port); - config.maintenance = false; - }); - } + server.listen(config.port, function () { + var schema = config.usessl ? 'HTTPS' : 'HTTP'; + logger.info('%s Server listening at port %d', schema, config.port); + config.maintenance = false; + }); } // sync db then start listen |