Skip to content

Commit

Permalink
Add option for choosing the host address
Browse files Browse the repository at this point in the history
Closes PR #26
  • Loading branch information
oivoodoo authored and jaimeMF committed Feb 23, 2015
1 parent 9e18134 commit d4b7cb2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion youtube_dl_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ def main():
help=port_help
)

default_host = 'localhost'
host_help = 'The host the server will use. The default is: {}'
host_help = host_help.format(default_host)
parser.add_argument('--host',
default=default_host,
type=str,
help=host_help
)

parser.add_argument('--version', action='store_true',
help='Print the version of the server')

Expand All @@ -32,4 +41,4 @@ def main():
print(__version__)
exit(0)

app.run('localhost', args.port)
app.run(args.host, args.port)

0 comments on commit d4b7cb2

Please sign in to comment.