chore: implement constants

This commit is contained in:
Bill Church 2024-08-21 17:42:45 +00:00
parent 5a65b6e91d
commit 4196ef3554
No known key found for this signature in database

View file

@ -3,6 +3,7 @@
const validator = require("validator")
const crypto = require("crypto")
const { createNamespacedDebug } = require("./logger")
const { DEFAULTS } = require("./constants")
const debug = createNamespacedDebug("utils")
@ -67,7 +68,7 @@ function getValidatedHost(host) {
* @returns {number} - The validated port number.
*/
function getValidatedPort(portInput) {
const defaultPort = 22
const defaultPort = DEFAULTS.SSH_PORT
const port = defaultPort
debug("getValidatedPort: input: %O", portInput)