diff --git a/index.js b/index.js index 1479083..d02dda7 100644 --- a/index.js +++ b/index.js @@ -61,7 +61,10 @@ program console.log(portInvalidMsg[1]) return } else { */ - if (!validate(domain, inPort, outPort)) return + if (!validate(domain, inPort, outPort)) { + console.log("I should get printed if I'm not validated") + return + } createProxyServer(domain, inPort, outPort) console.log("Done! Your server has been set up!\nPoint your domain to this server and check " + chalk.cyan(domain) + " to verify!") //} diff --git a/util/validate.js b/util/validate.js index 66bb193..c2b1d9b 100644 --- a/util/validate.js +++ b/util/validate.js @@ -8,7 +8,7 @@ function validate(domain, inPort, outPort = undefined) { var portInvalidMsg = ["\nPort should be a number.", "\nPort should be a number from 1 and 65535."] var validInPort = /^\d+$/.test(inPort) var validOutPort = /^\d+$/.test(outPort) - var isTrue + var isTrue = true if (!isDomain(domain)) { console.log(domainInvalidMsg) return isTrue = false