From c4b231e3375dce62c505c68ce2e8110836c01920 Mon Sep 17 00:00:00 2001 From: Eric Barbour Date: Jul 12 2016 13:24:49 +0000 Subject: Add --config arg for runserver.py --- diff --git a/runserver.py b/runserver.py index 05e2594..dea56b0 100755 --- a/runserver.py +++ b/runserver.py @@ -14,10 +14,16 @@ parser.add_argument( help='Hostname to listen on. When set to 0.0.0.0 the server is available \ externally. Defaults to localhost making the it only visible on \ localhost') +parser.add_argument( + '--config', '-c', + help='The configuration file to load from. Defaults to hubs.default_config. \ + Write the config file name in object form. For example: hubs.my_config') + args = parser.parse_args() from hubs.app import app app.debug = True +app.config.from_object(args.config) app.run(debug=True, host=args.host, port=int(args.port))