aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-12 23:57:15 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-12 23:57:15 +0000
commit7e4a3dd8f28450dc2fc7b19ed1ba281a0ba8ccec (patch)
treeb7a2d662599b1016f77db5e4b6bcb583291293ff
parentc557d7c5ad4b8c791c60d79c55e4925d7d3196ac (diff)
downloadgit-deps-7e4a3dd8f28450dc2fc7b19ed1ba281a0ba8ccec.tar.gz
allow specifying the webserver's TCP port to listen on
-rwxr-xr-xgit-deps5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-deps b/git-deps
index 0d3e2dd..e20ccb8 100755
--- a/git-deps
+++ b/git-deps
@@ -615,6 +615,9 @@ def parse_args():
parser.add_argument('-s', '--serve', dest='serve', action='store_true',
help='Run a web server for visualizing the '
'dependency graph')
+ parser.add_argument('-p', '--port', dest='port', type=int, metavar='PORT',
+ default=5000,
+ help='Port number for webserver [%(default)s]')
parser.add_argument('-r', '--recurse', dest='recurse', action='store_true',
help='Follow dependencies recursively')
parser.add_argument('-e', '--exclude-commits', dest='exclude_commits',
@@ -761,7 +764,7 @@ def serve(options):
"insecure!")
print("!! Arbitrary code can be executed from browser!")
print()
- webserver.run(debug=options.debug)
+ webserver.run(port=options.port, debug=options.debug)
def main():