bittorrent-relay
Advanced tools
Comparing version 9.0.1 to 9.0.2
@@ -42,3 +42,3 @@ #!/usr/bin/env node | ||
'auth': null, | ||
'dir': path.join(process.cwd(), 'dir'), | ||
'dir': path.join(process.cwd(), 'data'), | ||
'hashes': 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', | ||
@@ -45,0 +45,0 @@ 'key': null, |
{ | ||
"name": "bittorrent-relay", | ||
"description": "Uses the mainline dht to relay requests to other trackers in a swarm", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"bin": { | ||
@@ -6,0 +6,0 @@ "bittorrent-relay": "./bin/cmd.js" |
@@ -111,7 +111,13 @@ import Debug from 'debug' | ||
if(opts.dir){ | ||
if(!fs.existsSync(opts.dir)){ | ||
fs.mkdirSync(opts.dir) | ||
} | ||
} | ||
this.dir = path.join(opts.dir || __dirname, 'dir') | ||
this.index = Boolean(opts.index) | ||
if(!fs.existsSync(this.dir)){ | ||
fs.mkdirSync(this.dir) | ||
} | ||
this.index = Boolean(opts.index) | ||
if(this.index === true){ | ||
@@ -118,0 +124,0 @@ fs.writeFileSync(path.join(this.dir, 'index.html'), '<html><head><title>Relay</title></head><body><h1>Relay</h1><p>Relay</p></body></html>') |
2468
94456
12