Skip to content
Snippets Groups Projects
Commit 008bb466 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Use configuration for API network listening

parent ab9a5d98
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment