Add trackers to exist torrent file.
Install with npm
npm install bencode
npm install add-trackers
const { addTrackers } = require('add-trackers');
const fs = require('fs');
let newFile = addTrackers(pathToFile,mainTracker,trackerList,replaceTrackers);
fs.writeFileSync(pathToFile,newFile);
pathToFile
(string) - path to torrent filemainTracker
(string) - update main trackertrackerList
(array) - tracker list (if false use default list)replaceTrackers
(boolean) - replace trackers from tracker list