Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 80622e5

Browse files
committed
2 parents 5863f88 + a6606d0 commit 80622e5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

seed/httpseed.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
def run(*args):
3333
TESTNET = args[0]
34+
HTTPPORT = args[1]
3435

3536
# Create the database
3637
db = Database(testnet=TESTNET)
@@ -187,7 +188,7 @@ def render_GET(self, request):
187188
return server.NOT_DONE_YET
188189

189190
server_protocol = server.Site(WebResource(kserver))
190-
reactor.listenTCP(8080, server_protocol)
191+
reactor.listenTCP(HTTPPORT, server_protocol)
191192

192193
reactor.run()
193194

@@ -225,13 +226,14 @@ def start(self):
225226
python openbazaard.py start [-d DAEMON]''')
226227
parser.add_argument('-d', '--daemon', action='store_true', help="run the server in the background")
227228
parser.add_argument('-t', '--testnet', action='store_true', help="use the test network")
229+
parser.add_argument('-p', '--port', help="set the http port", default=8080)
228230
args = parser.parse_args(sys.argv[2:])
229231
print "OpenBazaar Seed Server v0.1 starting..."
230232
unix = ("linux", "linux2", "darwin")
231233
if args.daemon and platform.system().lower() in unix:
232-
self.daemon.start(args.testnet)
234+
self.daemon.start(args.testnet, int(args.port))
233235
else:
234-
run(args.testnet)
236+
run(args.testnet, int(args.port))
235237

236238
def stop(self):
237239
# pylint: disable=W0612

0 commit comments

Comments
 (0)