createServer() method doesn't work in NodeJS
keerthivasansa opened this issue · 2 comments
keerthivasansa commented
What version of this package are you using?
2.1.12
What operating system, Node.js, and npm version?
Windows 11
Node 16.18.0
NPM 8.9.2
What happened?
After using client.add() to add magnetURI, using the callback torrent
to create a server with torrent.createServer()
but it throws an error: torrent.createServer is not a function
What did you expect to happen?
Create a server for serving the contents of the torrent.
Are you willing to submit a pull request to fix this bug?
Yes.
ThaUnknown commented
that's a v1 API, you're using webtorrent V2, use client.createServer
keerthivasansa commented
Where is the documentation for that? Even the types included in the package seem to be in sync with the old way