Skip to content

Commit

Permalink
Add config parameter for HTTPS port. Fix #155
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Romero Brox committed Jun 4, 2013
1 parent 98dd067 commit 609e9b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ var start = function start(done) {
app._backlog = 2048;
apps.push(app);

var secureOptions;
var secureOptions, options;
dirModule = path.dirname(module.filename);
logger.info('config.enableSecure', config.enableSecure);

Expand All @@ -114,7 +114,7 @@ var start = function start(done) {
fs.statSync(secureOptions.key).isFile() &&
fs.statSync(secureOptions.cert).isFile()) {

var options = {
options = {
key: fs.readFileSync(secureOptions.key),
cert: fs.readFileSync(secureOptions.cert)
};
Expand All @@ -128,7 +128,7 @@ var start = function start(done) {
appSec.secOptions = options;
appSec.prefix = 'SEC:';
appSec.isSecure = true;
appSec.port = Number(config.agent.port) + 1;
appSec.port = Number(config.agent.httpsPort);

apps.push(appSec);
}
Expand Down
1 change: 1 addition & 0 deletions lib/baseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ exports.agent.maxMessages = 1000;
* @type {Number}
*/
exports.agent.port = 3001;
exports.agent.httpsPort = 3002;

/**
* Provision timeout
Expand Down

0 comments on commit 609e9b9

Please sign in to comment.