Use an environment variable for the Drupal URL

This commit is contained in:
Oliver Davies 2019-06-04 23:12:18 +01:00
parent 0bc9d45d0a
commit 4e939fb9a6
3 changed files with 3 additions and 2 deletions

1
.env Normal file
View file

@ -0,0 +1 @@
VUE_APP_DRUPAL_URL=

View file

@ -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 }) => {

View file

@ -69,7 +69,7 @@ export default {
}
}
const baseUrl = 'http://drupaltestcamp.docksal'
const baseUrl = process.env.VUE_APP_DRUPAL_URL
axios({
method: 'post',