Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ To start a BitTorrent tracker server to track swarms of peers:

```js
import { Server } from 'bittorrent-tracker'
// Or import Server from 'bittorrent-tracker/server'

const server = new Server({
udp: true, // enable udp server? [default=true]
Expand Down Expand Up @@ -267,6 +268,8 @@ Scraping multiple torrent info is possible with a static `Client.scrape` method:

```js
import Client from 'bittorrent-tracker'
// Or import Client from 'bittorrent-tracker/client'

Client.scrape({ announce: announceUrl, infoHash: [ infoHash1, infoHash2 ]}, function (err, results) {
results[infoHash1].announce
results[infoHash1].infoHash
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@
"node": ">=16.0.0"
},
"exports": {
"import": "./index.js"
".": {
"import": "./index.js"
},
"./client": {
"import": "./client.js"
},
"./server": {
"import": "./server.js"
}
},
"keywords": [
"bittorrent",
Expand Down
Loading