From 4e939fb9a6d26df0755ae9c2e297738b1b10153e Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 4 Jun 2019 23:12:18 +0100 Subject: [PATCH] Use an environment variable for the Drupal URL --- .env | 1 + src/App.vue | 2 +- src/components/SessionForm.vue | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..8dc3cc4 --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VUE_APP_DRUPAL_URL= diff --git a/src/App.vue b/src/App.vue index 60e6855..82b8022 100644 --- a/src/App.vue +++ b/src/App.vue @@ -30,7 +30,7 @@ export default { }, mounted () { - const baseUrl = 'http://drupaltestcamp.docksal' + const baseUrl = process.env.VUE_APP_DRUPAL_URL axios.get(`${baseUrl}/jsonapi/node/session`) .then(({ data }) => { diff --git a/src/components/SessionForm.vue b/src/components/SessionForm.vue index 28b6d22..307975b 100644 --- a/src/components/SessionForm.vue +++ b/src/components/SessionForm.vue @@ -69,7 +69,7 @@ export default { } } - const baseUrl = 'http://drupaltestcamp.docksal' + const baseUrl = process.env.VUE_APP_DRUPAL_URL axios({ method: 'post',