From e6004392050f9b31bffaa2c0068d3e890bb9da83 Mon Sep 17 00:00:00 2001 From: i-vall <ivallanzasca@gmail.com> Date: Fri, 5 Jul 2019 16:44:24 +0200 Subject: [PATCH] feat: export of key and url as env variables --- README.md | 9 +++++++++ src/index.js | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 10c6153..fd3a9c2 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,15 @@ Create a `konnector-dev-config.json` file at the root with your test credentials ``` Then : +Define the base url and the API authentication key as environment variable : + +```sh +export API_AUTH_KEY=<the_api_authentication_key> +export BASE_URL=<the_api_base_url> +``` + +Then : + ```sh yarn yarn standalone diff --git a/src/index.js b/src/index.js index 0a504e9..0c5edf1 100644 --- a/src/index.js +++ b/src/index.js @@ -11,9 +11,8 @@ const moment = require('moment') //const moment = require('moment') //require('request-debug')(rp) -const baseUrl = 'https://agence-rec.eaudugrandlyon.com/ws' -const apiAuthKey = - 'abe55f32cbcb403b3a121637c67d7570aadd62d1abb9696a6dcacdb87993e034' +const baseUrl = process.env.BASE_URL +const apiAuthKey = process.env.API_AUTH_KEY module.exports = new BaseKonnector(start) -- GitLab