{"_id":"freeport-async","_rev":"4521834","name":"freeport-async","description":"Finds an available port for your application to use.","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"alanhughes","email":""},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"expo-bot","email":""},{"name":"expoadmin","email":""},{"name":"exponent","email":""},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"philpl","email":""},{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"}],"time":{"modified":"2026-04-09T13:08:28.000Z","created":"2015-05-12T12:42:44.060Z","2.0.0":"2019-10-11T19:35:26.996Z","1.1.1":"2017-01-12T05:35:09.988Z","1.1.0":"2015-05-14T12:46:41.111Z","1.0.0":"2015-05-12T12:42:44.060Z"},"users":{},"author":{"name":"Expo"},"repository":{"type":"git","url":"git+https://github.com/expo/freeport-async.git"},"versions":{"2.0.0":{"name":"freeport-async","version":"2.0.0","description":"Finds an available port for your application to use.","license":"MIT","main":"index.js","engines":{"node":">=8"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/expo/freeport-async.git"},"keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"Expo"},"bugs":{"url":"https://github.com/expo/freeport-async/issues"},"homepage":"https://github.com/expo/freeport-async/blob/master/README.md","devDependencies":{"project-repl":"^1.5.0"},"gitHead":"b6274f5f0f4a90eeb1e2f67321de3a064f313d92","_id":"freeport-async@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"fson","email":"ville.immonen@iki.fi"},"dist":{"shasum":"6adf2ec0c629d11abff92836acd04b399135bab4","size":3393,"noattachment":false,"key":"/freeport-async/-/freeport-async-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/freeport-async/download/freeport-async-2.0.0.tgz"},"maintainers":[{"name":"alanhughes","email":""},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"expo-bot","email":""},{"name":"expoadmin","email":""},{"name":"exponent","email":""},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"philpl","email":""},{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/freeport-async_2.0.0_1570822526858_0.8390358449103754"},"_hasShrinkwrap":false,"publish_time":1570822526996,"_cnpm_publish_time":1570822526996,"_cnpmcore_publish_time":"2021-12-16T20:59:56.520Z"},"1.1.1":{"name":"freeport-async","version":"1.1.1","description":"Uses mikeal's code to find an open port in a given range","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/650Industries/freeport.git"},"keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"exponent.team@gmail.com"},"bugs":{"url":"https://github.com/650Industries/freeport/issues"},"homepage":"https://gist.github.com/mikeal/1840641","gitHead":"1939cf7c1883c4f68b02da7a9970535141442015","_id":"freeport-async@1.1.1","_shasum":"5c8cf4fc1aba812578317bd4d7a1e5597baf958e","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"exponent","email":"exponent.team@gmail.com"},"dist":{"shasum":"5c8cf4fc1aba812578317bd4d7a1e5597baf958e","size":2456,"noattachment":false,"key":"/freeport-async/-/freeport-async-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/freeport-async/download/freeport-async-1.1.1.tgz"},"maintainers":[{"name":"alanhughes","email":""},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"expo-bot","email":""},{"name":"expoadmin","email":""},{"name":"exponent","email":""},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"philpl","email":""},{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/freeport-async-1.1.1.tgz_1484199308143_0.018752024974673986"},"directories":{},"publish_time":1484199309988,"_hasShrinkwrap":false,"_cnpm_publish_time":1484199309988,"_cnpmcore_publish_time":"2021-12-16T20:59:56.718Z"},"1.1.0":{"name":"freeport-async","version":"1.1.0","description":"Uses mikeal's code to find an open port in a given range","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/650Industries/freeport.git"},"keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"exponent.team@gmail.com"},"bugs":{"url":"https://github.com/650Industries/freeport/issues"},"homepage":"https://gist.github.com/mikeal/1840641","gitHead":"cb428668a6fef918d23e251ff8cc6149f7c6c786","_id":"freeport-async@1.1.0","_shasum":"a9bbaa8e1a0a8bad613e9425d50930627ea1569f","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"exponent","email":"exponent.team@gmail.com"},"dist":{"shasum":"a9bbaa8e1a0a8bad613e9425d50930627ea1569f","size":2235,"noattachment":false,"key":"/freeport-async/-/freeport-async-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/freeport-async/download/freeport-async-1.1.0.tgz"},"maintainers":[{"name":"alanhughes","email":""},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"expo-bot","email":""},{"name":"expoadmin","email":""},{"name":"exponent","email":""},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"philpl","email":""},{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"}],"directories":{},"publish_time":1431607601111,"_hasShrinkwrap":false,"_cnpm_publish_time":1431607601111,"_cnpmcore_publish_time":"2021-12-16T20:59:57.125Z"},"1.0.0":{"name":"freeport-async","version":"1.0.0","description":"Uses mikeal's code to find an open port in a given range","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/650Industries/freeport.git"},"keywords":["port","free","open","new","fresh","clean","networking","mikeal"],"author":{"name":"exponent.team@gmail.com"},"bugs":{"url":"https://github.com/650Industries/freeport/issues"},"homepage":"https://gist.github.com/mikeal/1840641","gitHead":"2a3c840a067e2c53ed6bcc517009e52978559667","_id":"freeport-async@1.0.0","_shasum":"36a4a7e97e5828e8523aa4cc408e297b1a43488b","_from":".","_npmVersion":"2.8.4","_nodeVersion":"1.8.1","_npmUser":{"name":"exponent","email":"exponent.team@gmail.com"},"dist":{"shasum":"36a4a7e97e5828e8523aa4cc408e297b1a43488b","size":1846,"noattachment":false,"key":"/freeport-async/-/freeport-async-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/freeport-async/download/freeport-async-1.0.0.tgz"},"maintainers":[{"name":"alanhughes","email":""},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"evanbacon","email":"baconbrix@gmail.com"},{"name":"expo-bot","email":""},{"name":"expoadmin","email":""},{"name":"exponent","email":""},{"name":"ide","email":"ide+npm@jameside.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"philpl","email":""},{"name":"tsapeta","email":"sapeta.tomasz@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"}],"directories":{},"publish_time":1431434564060,"_hasShrinkwrap":false,"_cnpm_publish_time":1431434564060,"_cnpmcore_publish_time":"2021-12-16T20:59:57.317Z"}},"readme":"# freeport-async\n\nFinds an available port for your application to use.\nYou can specify a range where to look for an available port.\nAnd can also find a range of available ports for you to use.\nYou can also be used to test to see if a given port is available.\n\nAll functions are async and return Promises.\n\n## Usage\n\n### Basic\n\n```js\nlet freeportAsync = require(\"freeport-async\");\n\nlet portICanUse = await freeportAsync();\n```\n\n### Advanced\n\n```js\nlet freeportAsync = require(\"freeport-async\");\n\nlet portIn9000Range = await freeportAsync(9000);\n\nlet portAvailableForAnyOrLocalhost = await freeportAsync(9000, {\n  hostnames: [null, \"localhost\"]\n});\n\nlet isPort5000Available = await freeportAsync.availableAsync(5000);\n\nlet listOf5ConsecutiveAvailablePorts = await freeportAsync.rangeAsync(5);\n\nlet freeRangeIn12000Range = await freeportAsync.rangeAsync(3, 12000);\n```\n\n## Important Note\n\nNote that this code just finds available ports, but doesn't reserve them in any way.\nThis means that if you have other code that might be looking for a port in the same range at the same time, you could run into issues.\n\nAlso, if you call `freeportAsync` twice in a row, it will often return the same port number twice. If you want to find two (or more) ports you can use, you need to call `freeportAsync.rangeAsync(<number-of-ports>, [startSearchFrom])`.\n\nSee also https://gist.github.com/mikeal/1840641\n","_attachments":{},"homepage":"https://github.com/expo/freeport-async/blob/master/README.md","bugs":{"url":"https://github.com/expo/freeport-async/issues"},"license":"MIT"}