diff options
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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; |
