From 9ae10525f6e08fc24639957c2c7ba083f3f40129 Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Wed, 17 Apr 2019 14:36:32 +0200 Subject: [PATCH] config from variables --- server/src/config/config.ts | 41 ++++++++++++++++--------------- server/src/routes/UpdateRouter.ts | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/server/src/config/config.ts b/server/src/config/config.ts index 9fa3ec4..cbc8df5 100644 --- a/server/src/config/config.ts +++ b/server/src/config/config.ts @@ -1,25 +1,26 @@ const config = { app: { - port: 4000, - serviceScheme: 'http', - serviceHost: 'localhost', - servicePort: 4000, - nodeScheme: 'http', - nodeHost: 'localhost', - nodePort: 8545, - aquariusScheme: 'http', - aquariusHost: 'aquarius', - aquariusPort: 5000, - brizoScheme: 'http', - brizoHost: 'localhost', - brizoPort: 8030, - brizoAddress: '0x376817c638d2a04f475a73af37f7b51a2862d567', - parityScheme: 'http', - parityHost: 'localhost', - parityPort: 8545, - secretStoreScheme: 'http', - secretStoreHost: 'localhost', - secretStorePort: 12001, + port: process.env.SERVER_PORT || 4000, + nodeScheme: process.env.NODE_SCHEME || 'https', + nodeHost: process.env.NODE_HOST || 'nile.dev-ocean.com', + nodePort: process.env.NODE_PORT || 443, + aquariusScheme: process.env.AQUARIUS_SCHEME || 'https', + aquariusHost: + process.env.AQUARIUS_HOST || 'nginx-aquarius.dev-ocean.com', + aquariusPort: process.env.AQUARIUS_PORT || 443, + brizoScheme: process.env.BRIZO_SCHEME || 'https', + brizoHost: process.env.BRIZO_HOST || 'nginx-brizo.dev-ocean.com', + brizoPort: process.env.BRIZO_PORT || 443, + brizoAddress: + process.env.BRIZO_ADDRESS || + '0x376817c638d2a04f475a73af37f7b51a2862d567', + parityScheme: process.env.PARITY_SCHEME || 'https', + parityHost: process.env.PARITY_HOST || 'nile.dev-ocean.com', + parityPort: process.env.PARITY_PORT || 443, + secretStoreScheme: process.env.SECRET_STORE_SCHEME || 'https', + secretStoreHost: + process.env.SECRET_STORE_HOST || 'secret-store.dev-ocean.com', + secretStorePort: process.env.SECRET_STORE_PORT || 443, verbose: true } } diff --git a/server/src/routes/UpdateRouter.ts b/server/src/routes/UpdateRouter.ts index 91eeb7c..74cc72a 100644 --- a/server/src/routes/UpdateRouter.ts +++ b/server/src/routes/UpdateRouter.ts @@ -21,7 +21,7 @@ export class UpdateRouter { const providers = await getProviders() try { const userAccount = await providers.web3.eth.personal.ecRecover( - `You are retiring ${req.body.did}`, + `You are updating ${req.body.did}`, req.body.signature ) const events = await providers.ocean.keeper.didRegistry.contract.getPastEvents(