# hypermirror

> mirror hypercore and hyperdrive feeds

Latest version **2.1.0** (published 2019-02-17) · MIT license · 0 weekly downloads

## Install

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

Provides the command `hypermirror`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2019-02-17 |
| First published | 2016-07-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Joe Hand |
| Maintainers | jhand |

## Links

- npm: https://www.npmjs.com/package/hypermirror
- Repository: https://github.com/joehand/hypermirror
- Homepage: https://github.com/joehand/hypermirror#readme
- Issues: https://github.com/joehand/hypermirror/issues
- npm.io page: https://npm.io/package/hypermirror

## Dependencies (11)

- [pump](https://npm.io/package/pump.md) ^3.0.0
- [wrtc](https://npm.io/package/wrtc.md) ^0.3.5
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [signalhub](https://npm.io/package/signalhub.md) ^4.9.0
- [hyperdrive](https://npm.io/package/hyperdrive.md) ^9.14.2
- [webrtc-swarm](https://npm.io/package/webrtc-swarm.md) ^2.9.0
- [hyperdiscovery](https://npm.io/package/hyperdiscovery.md) ^8.0.0
- [hyperdrive-http](https://npm.io/package/hyperdrive-http.md) ^4.4.0
- [dat-link-resolve](https://npm.io/package/dat-link-resolve.md) ^2.3.0
- [random-access-memory](https://npm.io/package/random-access-memory.md) ^3.1.1

## Recent versions

- 2.1.0 (latest) — 2019-02-17
- 2.0.0 — 2019-02-16
- 1.1.0 — 2016-09-06
- 1.0.1 — 2016-08-26
- 1.0.0 — 2016-07-19

## README

# HyperMirror

Mirrors hyperdrives locally with support for:

* **WebRTC** - Allowing a node service to act as a gateway between Dat's p2p network and Web-based clients.
* **http** - View files locally via http server, especially useful in sparse mode.

 WebRTC,  Nice for testing!

## Install

```
npm install -g hypermirror
```

## Usage

`hypermirror <link>`

### Options

* `--webrtc` to mirror a Dat across Dat CLI and dat.land.
* `--sparse` to keep dat sparse, otherwise all data is downloaded.
* `--temp` or `-m` to keep hyperdrives in memory, otherwise they are written to `<cwd>/hypermirror-data`

Use `DEBUG=hypermirror` to view debug information.

## API

### `mirror(link, [opts], [cb])`

cb is called with `cb(err, feed)` where `feed` is either the hypercore feed or the hyperdrive archive.

See CLI for example usage.

Options can include:

```js
{
  temp: false, // keep in memory
  webrtc: false, // use wrtc to share via webrtc
  sparse: false // only download data as requested
}
```

## License

MIT

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