https://github.com/harttle/http-receiver
An http endpoint receiving and showing requests in realtime
https://github.com/harttle/http-receiver
http log realtime
Last synced: 10 months ago
JSON representation
An http endpoint receiving and showing requests in realtime
- Host: GitHub
- URL: https://github.com/harttle/http-receiver
- Owner: harttle
- Created: 2018-04-11T12:49:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-17T03:18:29.000Z (about 7 years ago)
- Last Synced: 2025-03-16T07:07:05.565Z (11 months ago)
- Topics: http, log, realtime
- Language: JavaScript
- Homepage:
- Size: 85 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# http-receiver
An http endpoint that provides realtime views.

## Get Started
Copy the following code into your page:
```html
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
```
Checkout 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 and checkout 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