diff options
| author | 2019-03-13 16:52:51 +0000 | |
|---|---|---|
| committer | 2019-03-13 16:52:51 +0000 | |
| commit | 4058608bf2359a998857515030efda5035e93862 (patch) | |
| tree | d522a7b56f41b4d72aa5d546fb4040bca305a943 /modules/rest_api.py | |
| parent | move `code` in to the string format arg for log functions (diff) | |
| signature | ||
Add 'api-port' setting to bot.conf and use it in rest_api.py
Diffstat (limited to 'modules/rest_api.py')
| -rw-r--r-- | modules/rest_api.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/rest_api.py b/modules/rest_api.py index bd5aca40..4784aa60 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -126,7 +126,8 @@ class Module(ModuleManager.BaseModule): self.httpd = None if self.bot.get_setting("rest-api", False): - self.httpd = http.server.HTTPServer(("", 5000), Handler) + port = int(self.bot.config.get("api-port", "5000")) + self.httpd = http.server.HTTPServer(("", port), Handler) self.httpd.socket = utils.security.ssl_wrap(self.httpd.socket, cert=self.bot.config["tls-api-certificate"], |
