Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mafintosh/peerwiki
all of wikipedia on bittorrent
https://github.com/mafintosh/peerwiki
Last synced: 28 days ago
JSON representation
all of wikipedia on bittorrent
- Host: GitHub
- URL: https://github.com/mafintosh/peerwiki
- Owner: mafintosh
- License: mit
- Created: 2014-09-03T09:29:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-09T21:48:23.000Z (almost 7 years ago)
- Last Synced: 2024-10-22T20:33:18.772Z (about 2 months ago)
- Language: JavaScript
- Size: 1.93 MB
- Stars: 314
- Watchers: 11
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs-cn - peerwiki - 所有 BitTorrent 上的维基百科 (包 / 黑科技)
- awesome-nodejs - peerwiki - All of Wikipedia on BitTorrent. (Packages / Mad science)
- awesome-network-js - peerwiki
- awesome-nodejs - peerwiki - all of wikipedia on bittorrent - ★ 285 (Mad science)
- awesome-nodejs-cn - peerwiki - 种子维基百科. (目录 / 逼格项目)
- awesome-nodejs-cn - peerwiki - **star:317** 建立在在 BitTorrent 上的维基百科 (包 / 黑科技)
README
# peerwiki
BROWSE ALL OF WIKIPEDIA USING BITTORENT
```
npm install -g peerwiki
```## Usage
```
peerwiki 9090 # starts a peerwiki server on port 9090
```To get more debug output do
```
DEBUG=peerwiki peerwiki 9090
```This can useful the first time you start browsing since it needs to some download some shared static assets which can result in a added latency
To use a pregenerated index (will speed up page load) do
```
peerwiki 9090 --use-index
```And open a browser on [http://localhost:9090/BitTorrent](http://localhost:9090/BitTorrent)
## Cache
When downloading articles they are cached on your local file system in `./peerwiki`.
## Programmatic usage
``` js
var peerwiki = require('peerwiki')
var wiki = peerwiki(function() {
// wiki is ready// fetch the BitTorrent article metadata from other peers
wiki.findEntryByUrl('html/B/i/t/T/BitTorrent', function(err, result) {
console.log(result)
})// fetch the actual article from other peers
wiki.findBlobByUrl('html/B/i/t/T/BitTorrent', function(err, buf) {
console.log(buf)
})wiki.listen(9091) // listen for p2p connections on port 9091
})
```## License
MIT