All files / src/args getPort.js

100% Statements 6/6
50% Branches 1/2
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 102x 2x   2x 1x 1x     2x  
const { getArg } = require('./getArg')
const argOptions = require('./argOptions')
 
const getPort = () => {
  const portOption = getArg(process.argv, argOptions.PORT)
  return portOption || 5000
}
 
module.exports = getPort