{"name":"portfinder","version":"1.0.33","keywords":["http","ports","utilities"],"author":{"name":"Charlie Robbins","email":"charlie.robbins@gmail.com"},"license":"MIT","_id":"portfinder@1.0.33","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":"03dbc51455aa8f83ad9fb86af8345e063bb51101","tarball":"http://registry-npm.ywwl.com/portfinder/download/portfinder-1.0.33.tgz","fileCount":5,"integrity":"sha512-+2jndHT63cL5MdQOwDm9OT2dIe11zVpjV+0GGRXdtO1wpPxv260NfVqoEXtYAi/shanmm3W4+yLduIe55ektTw==","signatures":[{"sig":"MEUCIDTs8uauGy89pRtazn901ad/YcN1DRiEcbFTVGqozSB9AiEAtfhwhmDJzsbUW6+Bi3D8rmHT51UvSRIdXupDVi9tTCU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21555,"size":6721,"noattachment":false,"key":"/portfinder/-/portfinder-1.0.33.tgz"},"main":"./lib/portfinder","types":"./lib/portfinder.d.ts","engines":{"node":">= 0.12.0"},"gitHead":"1d8fb461b909f4109ebe179b0a20db12bb6f4002","scripts":{"test":"vows test/*-test.js --spec"},"_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.1","description":"A simple tool to find an open port on the current machine","directories":{},"_nodeVersion":"20.13.1","dependencies":{"async":"^2.6.4","debug":"^3.2.7","mkdirp":"^0.5.6"},"_hasShrinkwrap":false,"devDependencies":{"vows":"^0.8.3"},"_npmOperationalInternal":{"tmp":"tmp/portfinder_1.0.33_1740611660548_0.030654471291004404","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":1740611660751,"_cnpm_publish_time":1740611660751,"dist-tags":{"latest":"1.0.38"}}