# choose-port

> Choose an available port

Latest version **0.3.2** (published 2020-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install choose-port
pnpm add choose-port
yarn add choose-port
bun add choose-port
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2020-06-06 |
| First published | 2020-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | André Lins |
| Maintainers | andrelmlins |
| Keywords | choose, port, server, host |

## Links

- npm: https://www.npmjs.com/package/choose-port
- Repository: https://github.com/andrelmlins/choose-port
- Issues: https://github.com/andrelmlins/choose-port/issues
- npm.io page: https://npm.io/package/choose-port

## Dependencies (1)

- [deasync](https://npm.io/package/deasync.md) ^0.1.19

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 0.3.2 (latest) — 2020-06-06
- 0.3.1 — 2020-05-29
- 0.3.0 — 2020-05-29
- 0.2.0 — 2020-03-06
- 0.1.0 — 2020-02-06

## README

# Choose Port

Choose an available port

[![npm version](https://badge.fury.io/js/choose-port.svg)](https://www.npmjs.com/package/choose-port) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/andrelmlins/choose-port/blob/master/LICENSE) [![Build Status](https://travis-ci.com/andrelmlins/choose-port.svg?branch=master)](https://travis-ci.com/andrelmlins/choose-port) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/andrelmlins/choose-port.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/andrelmlins/choose-port/context:javascript)

## Install

```
npm install choose-port
```

or

```
yarn add choose-port
```

## Usage

**Call Async**

```js
const choosePort = require('choose-port');

choosePort(8000, '127.0.0.1', portValid => {
  console.log('Chosen port:', portValid);
});
```

**Call Sync**

```js
const { choosePortSync } = require('choose-port');

const portValid = choosePortSync(8000, '127.0.0.1');

console.log(portValid);
```

## NPM Statistics

Download stats for this NPM package

[![NPM](https://nodei.co/npm/choose-port.png)](https://nodei.co/npm/choose-port/)

## License

Choose Port is open source software [licensed as MIT](https://github.com/andrelmlins/choose-port/blob/master/LICENSE).

---
_Source: https://npm.io/package/choose-port · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
