{"name":"portfinder","description":"A simple tool to find an open port on the current machine","version":"1.0.38","author":{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},"contributors":[{"name":"Erik Trom","email":"erik.trom@gmail.com"}],"repository":{"type":"git","url":"git+ssh://git@github.com/http-party/node-portfinder.git"},"keywords":["http","ports","utilities"],"dependencies":{"async":"^3.2.6","debug":"^4.3.6"},"devDependencies":{"jest":"^29.7.0"},"main":"./lib/portfinder","types":"./lib/portfinder.d.ts","scripts":{"test":"jest --runInBand"},"engines":{"node":">= 10.12"},"license":"MIT","_id":"portfinder@1.0.38","gitHead":"072d5fd4af07a9bb855d7eca8955d745c827c6fb","bugs":{"url":"https://github.com/http-party/node-portfinder/issues"},"homepage":"https://github.com/http-party/node-portfinder#readme","_nodeVersion":"20.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-rEwq/ZHlJIKw++XtLAO8PPuOQA/zaPJOZJ37BVuN97nLpMJeuDVLVGRwbFoBgLudgdTMP2hdRJP++H+8QOA3vg==","shasum":"e4fb3a2d888b20d2977da050e48ab5e1f57a185e","tarball":"http://registry-npm.ywwl.com/portfinder/download/portfinder-1.0.38.tgz","fileCount":5,"unpackedSize":22519,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC6kMFEZwrNhXagwN6hyCvOcn7oPsdn51eKbyc5Rao6DwIgEPSsq99RLArfE/hj/awp+9jRos3JqBnW7GVewKEfzHM="}],"size":6763,"noattachment":false,"key":"/portfinder/-/portfinder-1.0.38.tgz"},"_npmUser":{"name":"eriktrom","email":"erik.trom.github@gmail.com"},"directories":{},"maintainers":[{"name":"indexzero","email":"charlie.robbins@gmail.com"},{"name":"eriktrom","email":"erik.trom.github@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/portfinder_1.0.38_1757662722404_0.23303085857631167"},"_hasShrinkwrap":false,"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":1757662722587,"_cnpm_publish_time":1757662722587,"dist-tags":{"latest":"1.0.38"}}