examples: Externalize configuration values and allow for multiple environments

In order to more easily manage testing of various order types as well as production, development etc. environments, externalize this config values.

Signed-off-by: Herman van Hazendonk <github.com@herrie.org>
This commit is contained in:
Herrie
2019-11-29 13:12:15 +01:00
parent 5f57a072ea
commit c3d3decd6a
13 changed files with 90 additions and 82 deletions

View File

@@ -3,15 +3,9 @@
'use strict';
const ebics = require('../index');
const configjs = require('./config.js');
const client = new ebics.Client({
url: 'https://ebics.server',
partnerId: '',
userId: '',
hostId: '',
passphrase: 'test', // keys-test will be decrypted with this passphrase
keyStorage: ebics.fsKeysStorage('./keys-test'),
});
const client = gClient;
// The bank keys must have been already saved
client.send(ebics.Orders.HTD)