# http-receiver

> An http endpoint that provides realtime views

Latest version **1.1.3** (published 2019-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install http-receiver
pnpm add http-receiver
yarn add http-receiver
bun add http-receiver
```

Provides the command `http-receiver`.

## 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 | 1.1.3 |
| Published | 2019-01-17 |
| First published | 2018-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | harttle |
| Maintainers | harttle |

## Links

- npm: https://www.npmjs.com/package/http-receiver
- Repository: https://github.com/harttle/http-receiver
- Homepage: https://github.com/harttle/http-receiver#readme
- Issues: https://github.com/harttle/http-receiver/issues
- npm.io page: https://npm.io/package/http-receiver

## Dependencies (3)

- [express](https://npm.io/package/express.md) ^4.16.3
- [socket.io](https://npm.io/package/socket.io.md) ^2.1.0
- [concat-stream](https://npm.io/package/concat-stream.md) ^1.6.2

## Recent versions

- 1.1.3 (latest) — 2019-01-17
- 1.1.2 — 2019-01-17
- 1.1.1 — 2019-01-16
- 1.1.0 — 2019-01-16
- 1.0.4 — 2018-04-11
- 1.0.3 — 2018-04-11
- 1.0.2 — 2018-04-11
- 1.0.1 — 2018-04-11
- 1.0.0 — 2018-04-11

## README

# http-receiver

An http endpoint that provides realtime views.

![record](https://user-images.githubusercontent.com/4427974/38619045-dd4027de-3dcd-11e8-99d7-8ae740be0fec.gif)

## Get Started

Copy the following code into your page:

```html
<script>
window.rlog = window.remoteLog = function () {
    var text = Array.prototype.slice.call(arguments).map(function (arg) {
        return typeof arg === 'object' ? JSON.stringify(arg) : arg;
    }).join(' ');
    var img = document.createElement('img');
    img.src = 'receiver.harttle.com/?text=' + encodeURIComponent(text);
};
rlog('foo', '我爱你中国', {foo: 'bar'});    // send anything using rlog
</script>
```

Checkout  <http://log.harttle.com> for your log.

## Host Yourself

The receiver is a Node.js-based server and available on npm:

```bash
npm i -g http-receiver
PORT=8080 http-receiver
```

Send log to <http://localhost:3000> and checkout <http://localhost:8080> for your log.

## Environments

* `REC_PORT`: the port to receive data, default 3000
* `WEB_PORT`: the port showing realtime logs, default 8080
* `SIZE`: queue size for the cached requests, default 10

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