mirror of
https://github.com/hexahigh/cdn.git
synced 2025-12-11 20:15:22 +01:00
12 lines
262 B
JavaScript
12 lines
262 B
JavaScript
import createTorrent from 'create-torrent'
|
|
import fs from 'fs'
|
|
|
|
var opts = ""
|
|
|
|
createTorrent('./', [opts], (err, torrent) => {
|
|
if (!err) {
|
|
// `torrent` is a Buffer with the contents of the new .torrent file
|
|
fs.writeFile('site.torrent', torrent)
|
|
}
|
|
})
|