From 176374b98db90b477aa0ff0fe3e9bfc7c2a4b329 Mon Sep 17 00:00:00 2001 From: Ralph Maroun Date: Sat, 3 Mar 2018 21:05:57 +0100 Subject: [PATCH] Host address can be IP or DNS Removing constraint forcing to only enter IP address for Host as when using servers with dynamic IP then this won't work and would be a hassle to everytime reconfigure the cli --- config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.js b/config.js index 1335250..340219e 100644 --- a/config.js +++ b/config.js @@ -25,12 +25,12 @@ var hostname = [ { type: "input", name: "hostAddr", - message: "host IP address (with http:// || https://): ", + message: "host IP or DNS address (with http:// || https://): ", validate: value => { // validation for IP address. - let reg = /^(http|https):\/\/((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; + // let reg = /^(http|https):\/\/((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; if (!value) return "host IP address required"; - if (!value.match(reg)) return "please enter a valid IP address"; + // if (!value.match(reg)) return "please enter a valid IP address"; return true; } }