From 98dd0670a6902032e08cf60f159e5c08e3b6bf64 Mon Sep 17 00:00:00 2001 From: Carlos Romero Brox Date: Tue, 4 Jun 2013 11:46:58 +0200 Subject: [PATCH] Set default port to 3001 (scripts) --- utils/ack.js | 2 +- utils/createSecure.js | 2 +- utils/group.js | 2 +- utils/pop.js | 2 +- utils/provision.js | 2 +- utils/trans_info.js | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/utils/ack.js b/utils/ack.js index 2f3cf7a..2cdf1ee 100644 --- a/utils/ack.js +++ b/utils/ack.js @@ -12,7 +12,7 @@ var program = require('commander'), program .version('0.0.1') .option('-H, --host [hostname]', 'host, \'localhost\' by default', 'localhost') - .option('-P, --port [number]', 'port, 5001 by default', 5001, parseInt) + .option('-P, --port [number]', 'port, 5001 by default', 3001, parseInt) .option('-Q, --queue [id]', 'queue', "Q1") .option('-T, --trans [list]', 'list of transactions separated by comma', list) .option('-X, --secure', 'use HTTPS', false) diff --git a/utils/createSecure.js b/utils/createSecure.js index 1c763af..b7f53f8 100755 --- a/utils/createSecure.js +++ b/utils/createSecure.js @@ -12,7 +12,7 @@ var program = require('commander'), program .version('0.0.1') .option('-H, --host [hostname]', 'host, \'localhost\' by default', 'localhost') - .option('-P, --port [number]', 'port, 5001 by default', 5002, parseInt) + .option('-P, --port [number]', 'port, 5001 by default', 3002, parseInt) .option('-Q, --queue [id]', 'queue', "Q1") .option('-U, --user [id:passwd]', 'username','popbox:itscool') .parse(process.argv); diff --git a/utils/group.js b/utils/group.js index 61ab161..d69b578 100755 --- a/utils/group.js +++ b/utils/group.js @@ -12,7 +12,7 @@ var program = require('commander'), program .version('0.0.1') .option('-H, --host [hostname]', 'host, \'localhost\' by default', 'localhost') - .option('-P, --port [number]', 'port, 5001 by default', 5001, parseInt) + .option('-P, --port [number]', 'port, 5001 by default', 3001, parseInt) .option('-Q, --queues [list]', 'list of queues separated by comma', list, ["Q1"]) .option('-G, --group [id]', 'group to be created', ["G1"]) .option('-X, --secure', 'use HTTPS', false) diff --git a/utils/pop.js b/utils/pop.js index 292fead..c975968 100755 --- a/utils/pop.js +++ b/utils/pop.js @@ -17,7 +17,7 @@ var program = require('commander'), program .version('0.0.1') .option('-H, --host [hostname]', 'host, \'localhost\' by default', 'localhost') - .option('-P, --port [number]', 'port, 5001 by default', 5001, parseInt) + .option('-P, --port [number]', 'port, 5001 by default', 3001, parseInt) .option('-Q, --queue [id]', 'queue', "Q1") .option('-R, --reliable', 'reliable extraction', false) .option('-S, --subscribe', 'subscribe', false) diff --git a/utils/provision.js b/utils/provision.js index 4f6b84c..b1ed62e 100755 --- a/utils/provision.js +++ b/utils/provision.js @@ -12,7 +12,7 @@ var program = require('commander'), program .version('0.0.1') .option('-H, --host [hostname]', 'host, \'localhost\' by default', 'localhost') - .option('-P, --port [number]', 'port, 5001 by default', 5001, parseInt) + .option('-P, --port [number]', 'port, 5001 by default', 3001, parseInt) .option('-M, --message [text]', 'message','¡hola!\n') .option('-Q, --queues [list]', 'list of queues separated by comma', list, ["Q1"]) .option('-G, --groups [list]', 'list of groups separated by comma',list) diff --git a/utils/trans_info.js b/utils/trans_info.js index 5a21e54..b3c3de3 100755 --- a/utils/trans_info.js +++ b/utils/trans_info.js @@ -12,15 +12,15 @@ var program = require('commander'), program .version('0.0.1') .option('-H, --host [hostname]', 'host, \'localhost\' by default', 'localhost') - .option('-P, --port [number]', 'port, 5001 by default', 5001, parseInt) + .option('-P, --port [number]', 'port, 5001 by default', 3001, parseInt) .option('-T, --trans [id]', 'transaction') .option('-X, --secure', 'use HTTPS', false) .parse(process.argv); url = util.format('%s://%s:%d/trans/%s', program.secure ? 'https' : 'http', program.host, program.port, program.trans); -req_aux(url, function () { - req_aux(url + '/state', function(){}); +reqAux(url, function () { + reqAux(url + '/state', function(){}); }); -function req_aux(url, done) { +function reqAux(url, done) { console.log('url\n', url); request.get({url: url, headers: {'Accept': 'application/json'}}, function (err, res, body) { if (err) {