~metalune/public-inbox

Added port and host to config v1 PROPOSED

ManeraKai: 1
 Added port and host to config

 2 files changed, 5 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~metalune/public-inbox/patches/25629/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Added port and host to config Export this patch

---
 config.conf | 4 ++++
 main.py     | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/config.conf b/config.conf
index 237d8fd..508a302 100644
--- a/config.conf
+++ b/config.conf
@@ -14,3 +14,7 @@ ApiKey = [REDACTED]
[google]
# Google translate is enabled by default.
Enabled = True

[network]
port = 5000
host = 0.0.0.0
\ No newline at end of file
diff --git a/main.py b/main.py
index 03d3235..68652f0 100644
--- a/main.py
+++ b/main.py
@@ -288,4 +288,4 @@ async def about():


if __name__ == "__main__":
    app.run(port=5000, host="0.0.0.0")
    app.run(port=config.getint("network", "port", fallback=5000), host=str(config.get("network", "host", fallback="0.0.0.0"))) 
-- 
2.25.1
Thank you