mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2025-12-17 00:52:46 +00:00
feat: generalize examples
This commit is contained in:
21
examples/getClient.js
Normal file
21
examples/getClient.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
const { Client, fsKeysStorage } = require('../index');
|
||||
|
||||
const loadConfig = require('./loadConfig');
|
||||
|
||||
module.exports = ({
|
||||
serverAddress,
|
||||
partnerId,
|
||||
userId,
|
||||
hostId,
|
||||
passphrase,
|
||||
keyStoragePath,
|
||||
} = loadConfig()) => new Client({
|
||||
serverAddress,
|
||||
partnerId,
|
||||
userId,
|
||||
hostId,
|
||||
passphrase,
|
||||
keyStorage: fsKeysStorage(keyStoragePath),
|
||||
});
|
||||
Reference in New Issue
Block a user