remove dev logs

This commit is contained in:
samueleaton 2016-04-08 21:51:03 -06:00
parent 73a18b903d
commit b7d2cf619f
3 changed files with 5 additions and 5 deletions

View file

@ -2,11 +2,11 @@
const autossh = require('./index.js');
// open 5 ssh tunnels
for (let i = 0; i < 5; i++) {
// for (let i = 0; i < 5; i++) {
// set up config
autossh({
host: 'xyz.xy.xyz.yz', // enter host address
host: '192.241.216.152', // enter host address
username: 'same', // enter username
localPort: 'auto', // 'auto' or port number
remotePort: 5432
@ -23,7 +23,7 @@ for (let i = 0; i < 5; i++) {
console.log(`tunnel established from localhost:${connection.localPort} to ${connection.host}:${connection.remotePort} as ${connection.username}`);
});
}
// }
/* Possible output example (localPort results are be random)

View file

@ -50,7 +50,7 @@ var AutoSSH = function (_EventEmitter) {
});
var port = _this.localPort === 'auto' ? _this.generateRandomPort() : _this.localPort;
console.log('checkpoint 1');
_portfinder2.default.getPort({ port: port }, function (err, freePort) {
if (err) return _this.emit('error', 'Port error: ' + err);
if (_this.localPort !== 'auto' && _this.localPort !== freePort) return _this.emit('error', 'Port ' + _this.localPort + ' is not available');

View file

@ -24,7 +24,7 @@ class AutoSSH extends EventEmitter {
return confErrors.forEach(err => this.emit('error', err));
const port = this.localPort === 'auto' ? this.generateRandomPort() : this.localPort;
console.log('checkpoint 1');
portfinder.getPort({ port }, (err, freePort) => {
if (err)
return this.emit('error', 'Port error: ' + err);