simplify server

This commit is contained in:
ansuz
2018-02-28 18:15:01 +01:00
parent f96a5003b0
commit 5b84bc1a25
2 changed files with 18 additions and 20 deletions

View File

@@ -251,7 +251,7 @@ app.use(function (req, res, next) {
var httpServer = httpsOpts ? Https.createServer(httpsOpts, app) : Http.createServer(app);
/* Install sockjs websocket server */
OOServer.install(httpServer, () => {
OOServer.install(httpServer, config.httpPort, () => {
httpServer.listen(config.httpPort,config.httpAddress,function(){
var host = config.httpAddress;
var hostName = !host.indexOf(':') ? '[' + host + ']' : host;
@@ -264,7 +264,7 @@ OOServer.install(httpServer, () => {
});
if (config.httpSafePort) {
var safeHttpServer = Http.createServer(app).listen(config.httpSafePort, config.httpAddress);
OOServer.install(safeHttpServer, () => {
OOServer.install(safeHttpServer, config.httpSafePort, () => {
});
}