aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.js15
1 files changed, 15 insertions, 0 deletions
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;