1.1.3 • Published 5 years ago

http-receiver v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

http-receiver

An http endpoint that provides realtime views.

record

Get Started

Copy the following code into your page:

<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:

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
1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago