How to use the getPort function from portfinder

Find comprehensive JavaScript portfinder.getPort code examples handpicked from public code repositorys.

67
68
69
70
71
72
73
74
75
76
77
  ]
})


module.exports = new Promise((resolve, reject) => {
  portfinder.basePort = process.env.PORT || config.dev.port
  portfinder.getPort((err, port) => {
    if (err) {
      reject(err)
    } else {
      // publish the new Port, necessary for e2e tests
fork icon3
star icon3
watch icon2