Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mafintosh/hypercore-stats-ui
HTML based stats ui for hypercore/hyperdrive
https://github.com/mafintosh/hypercore-stats-ui
Last synced: about 1 month ago
JSON representation
HTML based stats ui for hypercore/hyperdrive
- Host: GitHub
- URL: https://github.com/mafintosh/hypercore-stats-ui
- Owner: mafintosh
- License: mit
- Created: 2016-06-29T18:41:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T08:59:59.000Z (almost 7 years ago)
- Last Synced: 2024-12-26T17:43:44.504Z (about 1 month ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 36
- Watchers: 6
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dat - hyperdrive-stats-ui - html-based user interface to `hypercore-stats-server` (Outdated / Other Related Dat Project Modules)
README
# hypercore-stats-ui
HTML based stats ui for [hypercore](https://github.com/mafintosh/hypercore)/[hyperdrive](https://github.com/mafintosh/hyperdrive)
```
npm install hypercore-stats-ui
```## Usage
``` js
var http = require('http')
var stats = require('hypercore-stats-ui')
var ram = require('random-access-memory')
var hypercore = require('hypercore')var feed = hypercore(ram, '72671c5004d3b956791b6ffca7f05025d62309feaf99cde04c6f434189694291')
http.createServer(stats(feed)).listen(1000)
```And visit http://localhost:10000 in the browser.
## API
#### `var onrequest = stats(feed or archive)`
Create a new stats interface for a hypercore feed or hyperdrive archive.
## License
MIT