From a5d6245519d4a77ed0a764439505aa012b4e4ca2 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Thu, 4 Apr 2019 12:41:03 +0200 Subject: [PATCH] Service parameters as env variables --- client/src/config.ts | 48 +++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/client/src/config.ts b/client/src/config.ts index a3447fe..0f076c4 100644 --- a/client/src/config.ts +++ b/client/src/config.ts @@ -1,37 +1,34 @@ -// -// commons-server connection -// -export const serviceScheme = 'http' -export const serviceHost = 'localhost' -export const servicePort = 4000 +export const serviceScheme = process.env.SERVICE_SCHEME || 'http' +export const serviceHost = process.env.SERVICE_HOST || 'localhost' +export const servicePort = process.env.SERVICE_PORT || 4000 // // OCEAN REMOTE CONNECTIONS // -export const nodeScheme = 'https' -export const nodeHost = 'nile.dev-ocean.com' -export const nodePort = 443 +export const nodeScheme = process.env.NODE_SCHEME || 'https' +export const nodeHost = process.env.NODE_HOST || 'nile.dev-ocean.com' +export const nodePort = process.env.NODE_PORT || 443 -export const aquariusScheme = 'https' -export const aquariusHost = 'nginx-aquarius.dev-ocean.com' -export const aquariusPort = 443 +export const aquariusScheme = process.env.AQUARIUS_SCHEME || 'https' +export const aquariusHost = process.env.AQUARIUS_HOST || 'nginx-aquarius.dev-ocean.com' +export const aquariusPort = process.env.AQUARIUS_PORT || 443 -export const brizoScheme = 'https' -export const brizoHost = 'nginx-brizo.dev-ocean.com' -export const brizoPort = 443 -export const brizoAddress = '0x376817c638d2a04f475a73af37f7b51a2862d567' +export const brizoScheme = process.env.BRIZO_SCHEME || 'https' +export const brizoHost = process.env.BRIZO_HOST || 'nginx-brizo.dev-ocean.com' +export const brizoPort = process.env.BRIZO_PORT || 443 +export const brizoAddress = process.env.BRIZO_ADDRESS || '0x376817c638d2a04f475a73af37f7b51a2862d567' -export const parityScheme = 'https' -export const parityHost = 'nile.dev-ocean.com' -export const parityPort = 443 +export const parityScheme = process.env.PARITY_SCHEME || 'https' +export const parityHost = process.env.PARITY_HOST || 'nile.dev-ocean.com' +export const parityPort = process.env.PARITY_PORT || 443 -export const secretStoreScheme = 'https' -export const secretStoreHost = 'secret-store.dev-ocean.com' -export const secretStorePort = 443 +export const secretStoreScheme = process.env.SECRET_STORE_SCHEME || 'https' +export const secretStoreHost = process.env.SECRET_STORE_HOST || 'secret-store.dev-ocean.com' +export const secretStorePort = process.env.SECRET_STORE_PORT || 443 -export const faucetScheme = 'https' -export const faucetHost = 'faucet.nile.dev-ocean.com' -export const faucetPort = 443 +export const faucetScheme = process.env.FAUCET_SCHEME || 'https' +export const faucetHost = process.env.FAUCET_HOST || 'faucet.nile.dev-ocean.com' +export const faucetPort = process.env.FAUCET_PORT || 443 // // OCEAN LOCAL CONNECTIONS @@ -65,3 +62,4 @@ export const faucetPort = 443 // export const faucetPort = 3001 export const verbose = true +