diff options
author | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-04-18 13:39:14 -0500 |
---|---|---|
committer | Lars Wirzenius <lwirzenius@wikimedia.org> | 2019-04-18 13:39:14 -0500 |
commit | c6afe5d6597d3648bc1c6bc2e25102cad05b2227 (patch) | |
tree | f5f7675c87bce0e4e99793114f24b64088e86b95 /muck_poc | |
parent | f9ba0c8565763cc185d2fbe94bb0296d845f210e (diff) | |
download | muck-poc-c6afe5d6597d3648bc1c6bc2e25102cad05b2227.tar.gz |
Add: optional port config setting for port to listen on
Defaults to the old 12765 port number.
Diffstat (limited to 'muck_poc')
-rwxr-xr-x | muck_poc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (C) 2018 Lars Wirzenius +# Copyright (C) 2018-2019 Lars Wirzenius # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or @@ -250,6 +250,8 @@ if config.get('pid'): with open(config['pid'], 'w') as f: f.write(str(pid)) +port = config.get('port', 12765) + app = bottle.default_app() api = MuckAPI(app, store, signing_key_text) -bottle.run(host='127.0.0.1', port=12765) +bottle.run(host='127.0.0.1', port=port) |