{"name":"portfinder","version":"1.0.34","keywords":["http","ports","utilities"],"author":{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},"license":"MIT","_id":"portfinder@1.0.34","maintainers":[{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"eriktrom","email":"erik.trom.github@gmail.com"}],"homepage":"https://github.com/http-party/node-portfinder#readme","bugs":{"url":"https://github.com/http-party/node-portfinder/issues"},"dist":{"shasum":"65b49b1cfa5f481208a8675ffca761d107d75fa8","tarball":"http://registry-npm.ywwl.com/portfinder/download/portfinder-1.0.34.tgz","fileCount":5,"integrity":"sha512-aTyliYB9lpGRx0iUzgbLpCz3xiCEBsPOiukSp1X8fOnHalHCKNxxpv2cSc00Cc49mpWUtlyRVFHRSaRJF8ew3g==","signatures":[{"sig":"MEUCIB6txUDraD9HJPiTJEJozuyJir+lRnGG7s6v9kfnbKJuAiEA1eh3XXYZkpmCEupNYdHepEcuSJwJJ4OMBeCnipfdAcE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20923,"size":6527,"noattachment":false,"key":"/portfinder/-/portfinder-1.0.34.tgz"},"main":"./lib/portfinder","types":"./lib/portfinder.d.ts","engines":{"node":">= 6.0"},"gitHead":"16dcb5e9d17f5859930ecc48587e4c7f79366471","scripts":{"test":"jest --runInBand"},"_npmUser":{"name":"eriktrom","email":"erik.trom.github@gmail.com"},"repository":{"url":"git+ssh://git@github.com/http-party/node-portfinder.git","type":"git"},"_npmVersion":"11.2.0","description":"A simple tool to find an open port on the current machine","directories":{},"_nodeVersion":"22.11.0","dependencies":{"async":"^3.2.6","debug":"^4.3.6","mkdirp":"^0.5.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.9.0"},"_npmOperationalInternal":{"tmp":"tmp/portfinder_1.0.34_1741723996036_0.9032842077590957","host":"s3://npm-registry-packages-npm-production"},"readme":"# node-portfinder\n\n[![CI](https://github.com/http-party/node-portfinder/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/http-party/node-portfinder/actions/workflows/ci.yml)\n\n## Installation\n\nYou can install `portfinder` using a package manager like npm, yarn, or bun:\n\n``` bash\nnpm install portfinder\n```\n\n## Usage\nThe `portfinder` module has a simple interface:\n\n``` js\nconst portfinder = require('portfinder');\n\nportfinder.getPort(function (err, port) {\n  //\n  // `port` is guaranteed to be a free port\n  // in this scope.\n  //\n});\n```\n\nOr using promises:\n\n``` js\nconst portfinder = require('portfinder');\n\nportfinder.getPortPromise()\n  .then((port) => {\n    //\n    // `port` is guaranteed to be a free port\n    // in this scope.\n    //\n  })\n  .catch((err) => {\n    //\n    // Could not get a free port, `err` contains the reason.\n    //\n  });\n```\n\n### Ports search scope\n\nBy default `portfinder` will start searching from `8000` and scan until maximum port number (`65535`) is reached.\n\nYou can change this globally by setting:\n\n```js\nportfinder.setBasePort(3000);    // default: 8000\nportfinder.setHighestPort(3333); // default: 65535\n```\n\nor by passing optional options object on each invocation:\n\n```js\nportfinder.getPort({\n  port: 3000,    // minimum port\n  stopPort: 3333 // maximum port\n}, callback);\n```\n\n## Run Tests\n``` bash\nnpm test\n```\n\n#### Author: [Charlie Robbins][0]\n#### Author/Maintainer: [Erik Trom][1]\n#### License: MIT/X11\n[0]: http://nodejitsu.com\n[1]: https://github.com/eriktrom\n","publish_time":1741723996221,"_cnpm_publish_time":1741723996221,"dist-tags":{"latest":"1.0.38"}}