Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c8329f6

Browse filesBrowse files
authored
Merge pull request #7 from coderplex/dotenv
Setup proxy in now
2 parents 0973ea5 + c6a6596 commit c8329f6
Copy full SHA for c8329f6

File tree

Expand file treeCollapse file tree

6 files changed

+21
-7
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+21
-7
lines changed

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ yarn-error.log*
1919
*.njsproj
2020
*.sln
2121
*.sw?
22+
23+
.env

‎now.json

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"routes": [
3+
{
4+
"src": "/api/(.*)",
5+
"dest": "https://openrank.herokuapp.com/api/$1"
6+
}
7+
]
8+
}

‎src/store/modules/authentication/login.js

Copy file name to clipboardExpand all lines: src/store/modules/authentication/login.js
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ export default {
3737
email,
3838
password,
3939
}).then(({ data: { data: { token }, message } }) => {
40-
console.log('TOKEN', token);
4140
commit('authentication/user/setToken', token, { root: true });
4241
commit('setSuccessMsg', message);
42+
setTimeout(() => commit('setSuccessMsg', null), 2000);
4343
router.push('/').catch(() => {});
4444
}).catch(({ response }) => {
45-
console.log('CAME HERE');
4645
commit('setErrorMsg', rootGetters.getErrorMessage(response));
47-
console.log(response);
46+
setTimeout(() => commit('setErrorMsg', null), 2000);
4847
});
4948
},
5049
},

‎src/store/modules/authentication/register.js

Copy file name to clipboardExpand all lines: src/store/modules/authentication/register.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ export default {
5050
password_confirmed,
5151
}).then(({ data: { message } }) => {
5252
commit('setSuccessMsg', message);
53+
setTimeout(() => commit('setSuccessMsg', null), 2000);
5354
}).catch(({ response }) => {
5455
commit('setErrorMsg', rootGetters.getErrorMessage(response));
55-
console.log(response);
56+
setTimeout(() => commit('setErrorMsg', null), 2000);
5657
});
5758
},
5859
},

‎src/store/modules/authentication/user.js

Copy file name to clipboardExpand all lines: src/store/modules/authentication/user.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ export default {
5858
commit('setName', name);
5959
commit('setEmail', email);
6060
commit('setSuccessMsg', message);
61+
setTimeout(() => commit('setSuccessMsg', null), 2000);
6162
}).catch(({ response }) => {
6263
commit('setErrorMsg', rootGetters.getErrorMessage(response));
63-
console.log(response);
64+
setTimeout(() => commit('setErrorMsg', null), 2000);
6465
});
6566
},
6667
async updateUser({
@@ -88,9 +89,10 @@ export default {
8889
commit('setName', user.name);
8990
commit('setEmail', user.email);
9091
commit('setSuccessMSg', message);
92+
setTimeout(() => commit('setSuccessMsg', null), 2000);
9193
}).catch(({ response }) => {
9294
commit('setErrorMsg', rootGetters.getErrorMessage(response));
93-
console.log(response);
95+
setTimeout(() => commit('setErrorMsg', null), 2000);
9496
});
9597
},
9698
},

‎vue.config.js

Copy file name to clipboardExpand all lines: vue.config.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ module.exports = {
22
devServer: {
33
proxy: {
44
'/api': {
5-
target: 'http://localhost:8000',
5+
target: 'https://localhost:8000',
6+
ws: true,
7+
changeOrigin: true,
68
headers: {
79
Connection: 'keep-alive',
810
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.