diff --git a/client/.env.development b/client/.env.development new file mode 100644 index 0000000..9a07ce7 --- /dev/null +++ b/client/.env.development @@ -0,0 +1 @@ +VUE_APP_BASE_APP_URL=http://192.168.2.35:5000 diff --git a/client/.env.production b/client/.env.production new file mode 100644 index 0000000..d3992ff --- /dev/null +++ b/client/.env.production @@ -0,0 +1 @@ +VUE_APP_BASE_APP_URL= diff --git a/client/src/components/Episode.vue b/client/src/components/Episode.vue index ddf094f..76d1a75 100644 --- a/client/src/components/Episode.vue +++ b/client/src/components/Episode.vue @@ -45,7 +45,7 @@ export default { }, methods: { getEpisode() { - const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/episode/\ + const path = `${process.env.VUE_APP_BASE_APP_URL}/api/episode/\ ${this.$route.params.season}/${this.$route.params.episode}/`; axios.get(path) .then((res) => { diff --git a/client/src/components/Home.vue b/client/src/components/Home.vue index 91da519..5238679 100644 --- a/client/src/components/Home.vue +++ b/client/src/components/Home.vue @@ -30,7 +30,7 @@ export default { }, methods: { getStats() { - const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/stats/`; + const path = `${process.env.VUE_APP_BASE_APP_URL}/api/stats/`; axios.get(path) .then((res) => { this.stats = res.data; diff --git a/client/src/components/SearchResult.vue b/client/src/components/SearchResult.vue index 1fafa67..2a0d5c7 100644 --- a/client/src/components/SearchResult.vue +++ b/client/src/components/SearchResult.vue @@ -87,7 +87,7 @@ export default { } }, fetchQuotes() { - const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/quote_surround?season=\ + const path = `${process.env.VUE_APP_BASE_APP_URL}/api/quote_surround?season=\ ${this.item.season}&episode=${this.item.episode_rel}&scene=${this.item.section_rel}"e=${this.item.quote_rel}`; axios.get(path) .then((res) => { diff --git a/client/src/components/SeasonList.vue b/client/src/components/SeasonList.vue index 8984f83..ef06795 100644 --- a/client/src/components/SeasonList.vue +++ b/client/src/components/SeasonList.vue @@ -151,7 +151,7 @@ export default { }, methods: { getSeasons() { - const path = `http://${process.env.VUE_APP_HOST}:${process.env.VUE_APP_FLASK_PORT}/api/episodes/`; + const path = `${process.env.VUE_APP_BASE_APP_URL}/api/episodes/`; axios.get(path) .then((res) => { this.seasons = res.data; diff --git a/dist/index.html b/dist/index.html index 3646cbf..433c696 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,4 +1,4 @@ -