| |
@@ -16,14 +16,21 @@
|
| |
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')
|
| |
+ help='A configuration file to load (allowing to override the default '
|
| |
+ 'configuraton)')
|
| |
|
| |
|
| |
args = parser.parse_args()
|
| |
|
| |
+ if args.config:
|
| |
+ config = args.config
|
| |
+ if not config.startswith('/'):
|
| |
+ here = os.path.join(os.path.dirname(os.path.abspath(__file__)))
|
| |
+ config = os.path.join(here, config)
|
| |
+ os.environ['HUBS_CONFIG'] = config
|
| |
+
|
| |
+
|
| |
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))
|
| |