# findandbind

> Find and bind to free port in restify/express/connect.

Latest version **0.2.0** (published 2013-09-04) · BSD license · 0 weekly downloads

## Install

```sh
npm install findandbind
pnpm add findandbind
yarn add findandbind
bun add findandbind
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2013-09-04 |
| First published | 2013-08-14 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Karl Gyllstrom |
| Maintainers | gyllstromk |
| Keywords | restify, express, connect, port |

## Links

- npm: https://www.npmjs.com/package/findandbind
- Repository: https://github.com/gyllstromk/node-find-and-bind
- Issues: https://github.com/gyllstromk/node-find-and-bind/issues
- npm.io page: https://npm.io/package/findandbind

## Dependencies (1)

- [async](https://npm.io/package/async.md) ~0.2.9

## 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.2.0 (latest) — 2013-09-04
- 0.0.0 — 2013-08-14

## README

# Find and bind

Find a free port to which to bind your restify/express/http server.

    $ npm install findandbind

## Usage

```js

var app = restify.createServer(); // or app = express(), etc

// ... do my configuration of app

var findandbind = require('findandbind');

findandbind(app, function (err, port) {
    // starts looking at 1024 ...
    console.log('listening on', port);
});
```

By default, `findandbind` starts checking at `1024`, the first user port.
To start checking at a different port:

```js

findandbind(app, { start: 2048 }, function (err, port) {
    console.log('listening on', port);
});
```

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