Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 520 Bytes

index.org

File metadata and controls

21 lines (18 loc) · 520 Bytes

Index

Intro

*****

Code

Imports

fs to read and bencode to decode the .torrent file; download to handle downloading the torrent pieces

import { openTorrent } from './src/utils/torrent-handler.js';
import { download } from './src/utils/download.js';

Torrent handling

Decodes the torrent, calls download

const torrent = openTorrent(process.argv[2]));
download(torrent);