From 73eecdb527deaafcac1d156e5515b7b0cc8fd1e1 Mon Sep 17 00:00:00 2001 From: nanalelfe Date: Fri, 2 Sep 2016 14:45:30 -0400 Subject: Fixed an error --- app.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'app.js') diff --git a/app.js b/app.js index a7de862..f8e2ab5 100644 --- a/app.js +++ b/app.js @@ -113,6 +113,21 @@ dbFile.setupDB(function (success, mssg) { } }); +function normalizePort(val) { + var port = parseInt(val, 10); + + if (isNaN(port)) { + // named pipe + return val; + } + + if (port >= 0) { + // port number + return port; + } + + return false; +} /*********************** Setup end *******************/ module.exports = app; -- cgit v1.2.3