Skip to content
This repository has been archived by the owner on Dec 26, 2021. It is now read-only.

Commit

Permalink
Add: --host parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
rbeer committed Sep 3, 2019
1 parent ab88423 commit 106e708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ COOKIE_DIR=./.htcookies
LOG_FILE=./logs/results.log
DEBUG_FILE=./logs/debug.log
PORT=4040
HOST=127.0.0.1
MONGO_HOST=127.0.0.1
MONGO_PORT=27017
MONGO_DB=tester
MONGO_RESULTS_COLLECTION=results
MONGO_OVERSHOT_COLLECTION=overshot
TWITTER_AUTH_KEY=GRAPHQL_KEY
3 changes: 2 additions & 1 deletion backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ def ensure_dir(path):
parser.add_argument('--daemon', action='store_true', help='run in background')
parser.add_argument('--debug', type=str, default=None, help='debug log file')
parser.add_argument('--port', type=int, default=8080, help='port which to listen on')
parser.add_argument('--host', type=str, default='127.0.0.1', help='hostname/ip which to listen on')
parser.add_argument('--mongo-host', type=str, default='localhost', help='hostname or IP of mongoDB service to connect to')
parser.add_argument('--mongo-port', type=int, default=27017, help='port of mongoDB service to connect to')
parser.add_argument('--mongo-db', type=str, default='tester', help='name of mongo database to use')
Expand Down Expand Up @@ -563,7 +564,7 @@ def run():
loop.run_until_complete(login_guests())
app = web.Application()
app.add_routes(routes)
web.run_app(app, host='127.0.0.1', port=args.port)
web.run_app(app, host=args.host, port=args.port)

if args.daemon:
with daemon.DaemonContext():
Expand Down

0 comments on commit 106e708

Please sign in to comment.