From 2ae175d1b5985f207891e7670ea976a408693b94 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Mon, 10 Jun 2019 00:43:09 +0200 Subject: [PATCH] Moved configurable api addresses to config.json. Elasticsearch relatime search can also be disabled by setting to false or undefined --- src/api.js | 7 +++---- src/components/SearchInput.vue | 10 +++++++++- src/config.json | 4 ++++ 3 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 src/config.json diff --git a/src/api.js b/src/api.js index fc73d39..1bc7b33 100644 --- a/src/api.js +++ b/src/api.js @@ -1,10 +1,9 @@ import axios from 'axios' import storage from '@/storage.js' +import config from '@/config.json' -// const SEASONED_URL = 'https://api.kevinmidboe.com/api/' -const SEASONED_URL = 'http://localhost:31459/api/' - -const ELASTIC_URL = 'http://localhost:9200/' +const SEASONED_URL = config.SEASONED_URL +const ELASTIC_URL = config.ELASTIC_URL // TODO // - Move autorization token and errors here? diff --git a/src/components/SearchInput.vue b/src/components/SearchInput.vue index fdcf7b3..e3d8afd 100644 --- a/src/components/SearchInput.vue +++ b/src/components/SearchInput.vue @@ -19,7 +19,7 @@ -