How to use the portscanner.checkPortStatusAsync function in portscanner

To help you get started, we’ve selected a few portscanner examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kengz / spacy-nlp / src / start-io.js View on Github external
function ioStart() {
  portscanner.checkPortStatusAsync(process.env.IOPORT, '')
    .then((status) => {
      if (status === 'closed') {
        // no poly socketIO server exists at port yet, start new
        return polyIO.server({
          port: process.env.IOPORT,
          clientCount: CLIENT_COUNT,
          debug: process.env['npm_config_debug']
      } else {
        return Promise.resolve()
  return (global.ioPromise || Promise.resolve()).delay(10)


Asynchronous port scanner for Node.js

Latest version published 6 years ago

Package Health Score

74 / 100
Full package analysis