UNPKG
node-libtorrent
Version:
latest (0.0.2)
0.0.2
0.0.1
rb-libtorrent bindings for node.js
fanatid.github.io/node-libtorrent/
fanatid/node-libtorrent
node-libtorrent
/
examples
/
create_torrent.coffee
9 lines
(7 loc)
•
198 B
text/coffeescript
View Raw
1
2
3
4
5
6
7
8
9
lt =
require
"../build/Release/libtorrent"
fs =
new
lt.
file_storage
() lt.
add_files
fs,
"./src"
ct =
new
lt.
create_torrent
(fs) lt.
set_piece_hashes
ct,
"."
t = lt.
bencode
ct.
generate
()
console
.
log
t