diff --git a/README.md b/README.md index 071b770fe4916b89fee983ad3c214d353f23a678..e3ef52ebc40e5c975cab2a92410646d74c006e09 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,26 @@ Implements: ## Install -**TODO** These should work once the repository is made public - ### Yarn +#### Once public + ```yarn yarn add git+https://git.noc.ac.uk/communications-backbone-system/backbone-adapter-javascript.git ``` +#### For now + +```yarn +# You may need to tell it how to use your ssh key +eval `ssh-agent -s` +ssh-add ~/.ssh/id_rsa +export GIT_SSH_COMMAND="/usr/bin/ssh -i /home/danjon/.ssh/id_rsa -o IdentitiesOnly=yes" + +# Then you can install the private repo via ssh +yarn add ssh://git@git.noc.ac.uk:communications-backbone-system/backbone-adapter-javascript.git#1-import-prototype-adapter-code-from-example-web-client +``` + ### NPM ```npm diff --git a/comms-adapter/index.js b/comms-adapter/index.js index e3cc98df1e32884926512abb0468e06fbc441a03..33b6849c47f0d7874b068775365d0649001d62aa 100644 --- a/comms-adapter/index.js +++ b/comms-adapter/index.js @@ -1,12 +1,11 @@ import Validator from 'swagger-model-validator'; import axios from 'axios'; -import * as soarConfig from '~/soar-config.json'; /** * Handle authentication and send/receive with the backbone */ export class Adapter { - constructor(protocol) { + constructor(protocol, soarConfig) { this.apiRoot = soarConfig.api; this.protocol = protocol; this.axios = axios;