Created
April 2, 2013 00:49
-
-
Save FLYBYME/5289082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module dependencies and config. | |
*/ | |
var express = require('express') | |
var rTorrent = require('rtorrent') | |
var rt = new rTorrent({ | |
host : 'localhost', | |
port : 80, | |
path : '/RPC2' | |
}); | |
rt.details(function(err, torrents) { | |
console.log('your list of torrents', torrents); | |
}) | |
var app = module.exports = express(); | |
app.get('/', function(req, res) { | |
res.send('Hello World'); | |
console.log('page render'); | |
}); | |
app.listen(3000); | |
console.log('Listening on port 3000'); |
I have not used rtorrent with nginx.
If you can get to rtorrent with xmlrpc using the server ip/url then use it with you config.
something like.
var rTorrent = require('rtorrent')
var rt = new rTorrent({
host : '192.168.1.20',
port : 5000,
path : '/RPC2'
});
rt.details(function(err, torrents, raw) {
if(err) throw err;
console.log('your list of torrents', torrents, raw);
})
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
localhost/RPC2 results in an error
127.0.0.1/RPC2 results in an error
HOWEVER using the sites ip address or url works
$ xmlrpc domain@name/RPC2 download_list Result: Array of 41 items: Index 0 String: '404F0AD7BE87D73A4089413E8AEFC23A0363DF1C'