# hyperwatch

> Streams server side log messages to the browser and renders them inside your page.

Latest version **0.5.4** (published 2014-03-29) · MIT license · 0 weekly downloads

## Install

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

## 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.5.4 |
| Published | 2014-03-29 |
| First published | 2013-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Thorsten Lorenz |
| Maintainers | thlorenz |
| Keywords | watch, terminal, browser, socket, stream, develop, productivity |

## Links

- npm: https://www.npmjs.com/package/hyperwatch
- Repository: https://github.com/thlorenz/hyperwatch
- Issues: https://github.com/thlorenz/hyperwatch/issues
- npm.io page: https://npm.io/package/hyperwatch

## Dependencies (5)

- [shoe](https://npm.io/package/shoe.md) 0.0.15
- [through](https://npm.io/package/through.md) ~2.3.4
- [domready](https://npm.io/package/domready.md) ~0.2.11
- [hypernal](https://npm.io/package/hypernal.md) ~0.2.0
- [get-style-property](https://npm.io/package/get-style-property.md) ~0.1.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.5.4 (latest) — 2014-03-29
- 0.5.3 — 2014-03-04
- 0.5.2 — 2013-12-12
- 0.5.1 — 2013-11-14
- 0.5.0 — 2013-05-17
- 0.4.0 — 2013-05-16
- 0.3.0 — 2013-05-12
- 0.2.0 — 2013-05-02
- 0.1.3 — 2013-05-02
- 0.1.2 — 2013-05-01
- 0.1.1 — 2013-05-01
- 0.1.0 — 2013-05-01

## README

# hyperwatch

Streams server side log messages to the browser and renders them inside your page.

[![screenshot](https://raw.github.com/thlorenz/hyperwatch/master/assets/screenshot.png)](http://thlorenz.github.io/hyperwatch/)

## Installation

    npm install hyperwatch

## Setup

### Client Side

#### using default options

```js
// just require hyperwatch in order to add a terminal to the browser window
require('hyperwatch')();
```

#### using custom options

#### make mini terminal appear merely a thumbnail

```js
require('hyperwatch')({
  mini: {
      position: 'top right'
    , size: '100x100'
    , fontSize: 3
  }
});
```

#### make mini terminal appear rather large and get called back when terminals have been initialized

```js
require('hyperwatch')({
    mini: {
          position: 'bottom left'
        , size: '600x100'
        , fontSize: 12 
      }
    }
  , function () { console.log('terminals have been initialized'); }
);
```

### Server Side

Pass the server to hyperwatch. 

#### using express

Pass return value of `listen`:

```js
var express    =  require('express')
  , app        =  express()
  , hyperwatch =  require('hyperwatch');

var config = hyperwatch(app.listen(3000));
```
*[full example](https://github.com/thlorenz/hyperwatch/tree/master/examples/express-app)*

#### using ecstatic

Pass http server:

```js
var ecstatic = require('ecstatic')(__dirname + '/static');

var server = http.createServer(ecstatic);
server.listen(3000);

var config = hyperwatch(server);
```

## Configuration

Calling `hyperwatch(server)` initializes and enables hyperwatch and returns a `config` object with the following functions:

***config.disable***

Invoking `config.disable()` will stop data to be streamed to the client and hide the mini terminal when the browser
is refreshed.

***config.enable***

Invoking `config.enable()` will resume data to be streamed to the client and show the mini terminal when the browser
is refreshed.

***config.scrollback***

Specifies the number of log messages that will be preserved between browser refreshes. The default is `10,000`. Keep in
mind that this data is kept in memory when setting this to very high values.

## Interactions

### Click Mini Terminal

Toggles full size Terminal

### Alt/Option-Click Mini Terminal

Make it jump from left to right and vice versa in case it gets in your way

## Demo

    npm explore hyperwatch && npm run demo

Then open [localhost:3000](http://localhost:3000).

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