diff --git a/helpers/properties.js b/helpers/properties.js index 21c5ee8..2710979 100644 --- a/helpers/properties.js +++ b/helpers/properties.js @@ -1,7 +1,9 @@ var host = 'localhost'; -var port = 5001; +var port = 201; var ssl = false; +var connectionTimeout = 30 * 60 * 1000; module.exports.HOST = host; module.exports.PORT = port; module.exports.SSL = ssl; +module.exports.CONNECTION_TIMEOUT = connectionTimeout; diff --git a/server.js b/server.js index 1ad4322..9cdc2dd 100644 --- a/server.js +++ b/server.js @@ -7,6 +7,7 @@ var endpoint_sinal = require('./endpoints/sinal'); /* Environment */ var fs = require('fs'); var https = require('https'); +var http = require('http'); var path = require('path'); var express = require('express'); var bodyParser = require('body-parser'); @@ -85,9 +86,11 @@ function createHttpsServer() { } function createHttpServer() { - app.listen(properties.PORT, properties.HOST, function() { - console.log('Server running on http://' + properties.HOST + ':' + properties.PORT); - }); + var httpServer = http.createServer(app); + httpServer.setTimeout(properties.CONNECTION_TIMEOUT); + httpServer.listen(properties.PORT, properties.HOST, function() { + console.log('Server running on http://' + properties.HOST + ':' + properties.PORT); + }); } if (properties.SSL) { -- libgit2 0.21.2