From 0adfefd15700c0ea848a977783e241fcd8cce69e Mon Sep 17 00:00:00 2001 From: Tien Nguyen Truong Date: Sun, 13 Sep 2020 09:02:57 +0700 Subject: [PATCH] refactor minor --- README.md | 33 +++++++++++++++++++++++++++++++-- src/views/BoardAdmin.vue | 2 +- src/views/BoardModerator.vue | 2 +- src/views/BoardUser.vue | 2 +- src/views/Home.vue | 2 +- src/views/Login.vue | 2 +- src/views/Register.vue | 2 +- vue.config.js | 5 +++++ 8 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 vue.config.js diff --git a/README.md b/README.md index 8c1b9c3..b46489b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,18 @@ # Vue.js JWT Authentication with Vuex and Vue Router -For more detail, please visit: -> [Vue.js JWT Authentication with Vuex and Vue Router](https://bezkoder.com/jwt-vue-vuex-authentication/) +For instruction, please visit: +> [Vue 2 JWT Authentication with Vuex and Vue Router](https://bezkoder.com/jwt-vue-vuex-authentication/) + +> [Using Typescript](https://bezkoder.com/vuex-typescript-jwt-auth/) + +> [Vue 3 JWT Authentication with Vuex and Vue Router](https://bezkoder.com/vue-3-authentication-jwt/) + +More Practice: +> [Vue.js CRUD App with Vue Router & Axios](https://bezkoder.com/vue-js-crud-app/) + +> [Vue Pagination with Axios and API example](https://bezkoder.com/vue-pagination-axios/) + +> [Vue File Upload example using Axios](https://bezkoder.com/vue-axios-file-upload/) Fullstack with Spring Boot Back-end: > [Spring Boot + Vue.js: Authentication with JWT & Spring Security Example](https://bezkoder.com/spring-boot-vue-js-authentication-jwt-spring-security/) @@ -9,6 +20,24 @@ Fullstack with Spring Boot Back-end: Fullstack with Node.js Express Back-end: > [Node.js Express + Vue.js: JWT Authentication & Authorization example](https://bezkoder.com/node-express-vue-jwt-auth/) +Fullstack CRUD: +> [Vue.js + Node.js + Express + MySQL example](https://bezkoder.com/vue-js-node-js-express-mysql-crud-example/) + +> [Vue.js + Node.js + Express + PostgreSQL example](https://bezkoder.com/vue-node-express-postgresql/) + +> [Vue.js + Node.js + Express + MongoDB example](https://bezkoder.com/vue-node-express-mongodb-mevn-crud/) + +> [Vue.js + Spring Boot + MySQL/PostgreSQL example](https://bezkoder.com/spring-boot-vue-js-crud-example/) + +> [Vue.js + Spring Boot + MongoDB example](https://bezkoder.com/spring-boot-vue-mongodb/) + +> [Vue.js + Django example](https://bezkoder.com/django-vue-js-rest-framework/) + +Integration (run back-end & front-end on same server/port) +> [Integrate Vue.js with Spring Boot](https://bezkoder.com/integrate-vue-spring-boot/) + +> [Integrate Vue App with Node.js Express](https://bezkoder.com/serve-vue-app-express/) + ## Note: Open `src/services/auth-header.js` and modify `return` statement for appropriate back-end. diff --git a/src/views/BoardAdmin.vue b/src/views/BoardAdmin.vue index 5934071..f067099 100644 --- a/src/views/BoardAdmin.vue +++ b/src/views/BoardAdmin.vue @@ -23,7 +23,7 @@ export default { }, error => { this.content = - (error.response && error.response.data) || + (error.response && error.response.data && error.response.data.message) || error.message || error.toString(); } diff --git a/src/views/BoardModerator.vue b/src/views/BoardModerator.vue index a3a5962..8c58de2 100644 --- a/src/views/BoardModerator.vue +++ b/src/views/BoardModerator.vue @@ -23,7 +23,7 @@ export default { }, error => { this.content = - (error.response && error.response.data) || + (error.response && error.response.data && error.response.data.message) || error.message || error.toString(); } diff --git a/src/views/BoardUser.vue b/src/views/BoardUser.vue index 14eb1d3..4eca0c8 100644 --- a/src/views/BoardUser.vue +++ b/src/views/BoardUser.vue @@ -23,7 +23,7 @@ export default { }, error => { this.content = - (error.response && error.response.data) || + (error.response && error.response.data && error.response.data.message) || error.message || error.toString(); } diff --git a/src/views/Home.vue b/src/views/Home.vue index 4dfd071..da9b2f7 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -23,7 +23,7 @@ export default { }, error => { this.content = - (error.response && error.response.data) || + (error.response && error.response.data && error.response.data.message) || error.message || error.toString(); } diff --git a/src/views/Login.vue b/src/views/Login.vue index c444f68..22b7450 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -90,7 +90,7 @@ export default { error => { this.loading = false; this.message = - (error.response && error.response.data) || + (error.response && error.response.data && error.response.data.message) || error.message || error.toString(); } diff --git a/src/views/Register.vue b/src/views/Register.vue index 5db527b..6cc9128 100644 --- a/src/views/Register.vue +++ b/src/views/Register.vue @@ -101,7 +101,7 @@ export default { }, error => { this.message = - (error.response && error.response.data) || + (error.response && error.response.data && error.response.data.message) || error.message || error.toString(); this.successful = false; diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..a053f60 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,5 @@ +module.exports = { + devServer: { + port: 8081 + } +} \ No newline at end of file