diff --git a/config/dev.env.js b/config/dev.env.js index efead7c..a499fad 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -2,5 +2,7 @@ var merge = require('webpack-merge') var prodEnv = require('./prod.env') module.exports = merge(prodEnv, { - NODE_ENV: '"development"' + DEBUG_MODE: true, + NODE_ENV: '"development"', + API_URL: '"http://localhost:3000"' }) diff --git a/config/prod.env.js b/config/prod.env.js index 773d263..6576b0b 100644 --- a/config/prod.env.js +++ b/config/prod.env.js @@ -1,3 +1,5 @@ module.exports = { - NODE_ENV: '"production"' + DEBUG_MODE: false, + NODE_ENV: '"production"', + API_URL: '"https://incentifyapi.herokuapp.com"' } diff --git a/src/components/Dashboard.vue b/src/components/Dashboard.vue index a2298f6..2e52aaa 100644 --- a/src/components/Dashboard.vue +++ b/src/components/Dashboard.vue @@ -8,7 +8,7 @@
-

Treehouse comrww

+

Treehouse Reggiesibley

45%

45% of {{55}} Points

Time Remaining: 1 day, 23 hours, 21 minutes
@@ -18,7 +18,7 @@
-

DuoLingo comrww

+

DuoLingo Reggiesibley

5%

5% of {{55}} Points

Time Remaining: 2 days, 3 hours, 10 minutes
@@ -37,18 +37,17 @@ export default { }; }, ready() { - this.$http.get('http://localhost:3000/users').then((response) => { - console.log(response) - // success callback - this.dashboardData = response.body.map(function(i) { - return _.extend(i, { showUserInfo: false }) - }) - }, (response) => { - // error callback - this.failure = !this.failure; - }); - } - + this.$http.get(process.env.API_URL + '/users').then((response) => { + console.log(response) + // success callback + this.dashboardData = response.body.map(function(i) { + return _.extend(i, { showUserInfo: false }) + }) + }, (response) => { + // error callback + this.failure = !this.failure; + }); + } }; diff --git a/src/components/Goal.vue b/src/components/Goal.vue index ccd5eee..80be6c8 100644 --- a/src/components/Goal.vue +++ b/src/components/Goal.vue @@ -18,7 +18,7 @@

{{integration.description}}

- +
@@ -28,7 +28,6 @@ \ No newline at end of file diff --git a/src/components/Profile.vue b/src/components/Profile.vue index 91b91a1..8b74250 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -42,7 +42,6 @@ diff --git a/src/components/Register.vue b/src/components/Register.vue index aca681f..e26b360 100644 --- a/src/components/Register.vue +++ b/src/components/Register.vue @@ -88,7 +88,7 @@ export default { methods: { registerUser() { - this.$http.post('http://localhost:3000/auth/register', this.login).then((response) => { + this.$http.post(process.env.API_URL + '/auth/register', this.register).then((response) => { // server sends back JWT, we put it in localStorage localStorage.setItem('token', response.body.token) @@ -115,7 +115,7 @@ export default { }); }, loginUser() { - this.$http.post('http://localhost:3000/auth/login', this.login).then((response) => { + this.$http.post(process.env.API_URL + '/auth/login', this.login).then((response) => { // server sends back JWT, we put it in localStorage localStorage.setItem('token', response.body.token) diff --git a/src/components/add-goal.vue b/src/components/add-goal.vue index 56f8078..69f4904 100644 --- a/src/components/add-goal.vue +++ b/src/components/add-goal.vue @@ -1,27 +1,30 @@