From 008bb466b1b89a5799389f0fb3c7cc2ab9c1426c Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Sun, 9 Dec 2018 20:32:58 +0100 Subject: [PATCH] [enh] Use configuration for API network listening --- index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 71750b7..b37775a 100644 --- a/index.ts +++ b/index.ts @@ -69,7 +69,13 @@ Duniter.run([{ ':gva:' + conf.pair.pub.substr(0, 6)) return { startService: async () => { - if (!conf.gva || conf.gva.upnp) { + if (conf.gva) { + // Static usage of port + host, no UPnP + app = gvaHttpListen(server, + conf.gva.port || DEFAULT_GVA_PORT, + conf.gva.host || 'localhost') + } + else if (!conf.gva || conf.gva.upnp) { // Using UPnP const { available, host, port } = await api.startRegular() if (available) { -- GitLab