{"name":"portfinder","version":"1.0.35","keywords":["http","ports","utilities"],"author":{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},"license":"MIT","_id":"portfinder@1.0.35","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":"6ebaf945da4d14c55d996e907b217f73e1dc06c9","tarball":"http://registry-npm.ywwl.com/portfinder/download/portfinder-1.0.35.tgz","fileCount":5,"integrity":"sha512-73JaFg4NwYNAufDtS5FsFu/PdM49ahJrO1i44aCRsDWju1z5wuGDaqyFUQWR6aJoK2JPDWlaYYAGFNIGTSUHSw==","signatures":[{"sig":"MEYCIQDigYpWOGE/dfFC93FSgTDPI5530iPiH3xppUY4Xo9JMQIhAMHjVrULxGS/wUmA0lkGJyRy/PKFcuhestl3jWH48hU4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21388,"size":6579,"noattachment":false,"key":"/portfinder/-/portfinder-1.0.35.tgz"},"main":"./lib/portfinder","types":"./lib/portfinder.d.ts","engines":{"node":">= 10.12"},"gitHead":"8460965f3cb11f24a7b06b3b04c3595e2b50cc62","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":"10.9.2","description":"A simple tool to find an open port on the current machine","directories":{},"_nodeVersion":"22.14.0","dependencies":{"async":"^3.2.6","debug":"^4.3.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.9.0"},"_npmOperationalInternal":{"tmp":"tmp/portfinder_1.0.35_1741945232618_0.6029975473709528","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":1741945232785,"_cnpm_publish_time":1741945232785,"dist-tags":{"latest":"1.0.38"}}