Skip to content

Commit a725bcd

Browse files
committed
refactor code in one example
1 parent 923a99c commit a725bcd

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

examples/findApiProductForProxy.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// ------------------------------------------------------------------
33
//
44
// created: Mon Mar 20 09:57:02 2017
5-
// last saved: <2017-December-07 18:19:37>
5+
// last saved: <2017-December-07 18:30:02>
66

77
var edgejs = require('apigee-edge-js'),
88
common = edgejs.utility,
@@ -14,24 +14,25 @@ var edgejs = require('apigee-edge-js'),
1414
['T' , 'notoken', 'Optional. do not try to obtain a login token.']
1515
])).bindHelp();
1616

17-
console.log(
18-
'Apigee Edge findApiProductForProxy.js tool, version: ' + version + '\n' +
19-
'Node.js ' + process.version + '\n');
20-
21-
common.logWrite('start');
22-
23-
// process.argv array starts with 'node' and 'scriptname.js'
24-
var opt = getopt.parse(process.argv.slice(2));
25-
2617
function handleError(e) {
2718
if (e) {
2819
console.log(e);
2920
console.log(e.stack);
3021
process.exit(1);
3122
}
3223
}
24+
3325
// ========================================================
3426

27+
console.log(
28+
'Apigee Edge findApiProductForProxy.js tool, version: ' + version + '\n' +
29+
'Node.js ' + process.version + '\n');
30+
31+
common.logWrite('start');
32+
33+
// process.argv array starts with 'node' and 'scriptname.js'
34+
var opt = getopt.parse(process.argv.slice(2));
35+
3536
common.verifyCommonRequiredParameters(opt.options, getopt);
3637

3738
if ( !opt.options.proxy ) {

0 commit comments

Comments
 (0)