async function resolvePort (port) {
  const portfinder = require('portfinder')
  portfinder.basePort = parseInt(port) || 8080
  port = await portfinder.getPortPromise()
  return port
}
async function resolvePort (port) {
  const portfinder = require('portfinder')
  portfinder.basePort = parseInt(port) || 8080
  port = await portfinder.getPortPromise()
  return port
}
async function resolvePort ( port ) { const portfinder = require ( 'portfinder' ) portfinder . basePort = parseInt ( port ) || 8080 port = await portfinder . getPortPromise ( ) return port }
Resolve port.

@param {number} port user's port
@returns {Promise<number>}
Resolve port .
Resolve a port